Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Copyright (C) 2010-2013 Bluecherry, LLC <https://www.bluecherrydvr.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * Original author:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  * Ben Collins <bcollins@ubuntu.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  * Additional work by:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9)  * John Brooks <john.brooks@bluecherry.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #ifndef __SOLO6X10_TW28_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define __SOLO6X10_TW28_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include "solo6x10.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define TW_NUM_CHIP				4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define TW_BASE_ADDR				0x28
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define TW_CHIP_OFFSET_ADDR(n)			(TW_BASE_ADDR + (n))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) /* tw2815 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define TW_AV_STAT_ADDR				0x5a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define TW_HUE_ADDR(n)				(0x07 | ((n) << 4))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define TW_SATURATION_ADDR(n)			(0x08 | ((n) << 4))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define TW_CONTRAST_ADDR(n)			(0x09 | ((n) << 4))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #define TW_BRIGHTNESS_ADDR(n)			(0x0a | ((n) << 4))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define TW_AUDIO_OUTPUT_VOL_ADDR		0x70
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define TW_AUDIO_INPUT_GAIN_ADDR(n)		(0x60 + ((n > 1) ? 1 : 0))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) /* tw286x */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define TW286x_AV_STAT_ADDR			0xfd
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #define TW286x_HUE_ADDR(n)			(0x06 | ((n) << 4))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #define TW286x_SATURATIONU_ADDR(n)		(0x04 | ((n) << 4))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #define TW286x_SATURATIONV_ADDR(n)		(0x05 | ((n) << 4))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #define TW286x_CONTRAST_ADDR(n)			(0x02 | ((n) << 4))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #define TW286x_BRIGHTNESS_ADDR(n)		(0x01 | ((n) << 4))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) #define TW286x_SHARPNESS(n)			(0x03 | ((n) << 4))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) #define TW286x_AUDIO_OUTPUT_VOL_ADDR		0xdf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #define TW286x_AUDIO_INPUT_GAIN_ADDR(n)		(0xD0 + ((n > 1) ? 1 : 0))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) int solo_tw28_init(struct solo_dev *solo_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) int tw28_set_ctrl_val(struct solo_dev *solo_dev, u32 ctrl, u8 ch, s32 val);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) int tw28_get_ctrl_val(struct solo_dev *solo_dev, u32 ctrl, u8 ch, s32 *val);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) bool tw28_has_sharpness(struct solo_dev *solo_dev, u8 ch);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) u8 tw28_get_audio_gain(struct solo_dev *solo_dev, u8 ch);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) void tw28_set_audio_gain(struct solo_dev *solo_dev, u8 ch, u8 val);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) int tw28_get_video_status(struct solo_dev *solo_dev, u8 ch);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) #if 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) unsigned int tw2815_get_audio_status(struct SOLO *solo);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) void tw2815_Set_AudioOutVol(struct SOLO *solo, unsigned int u_val);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #endif /* __SOLO6X10_TW28_H */