add 3.06 led module, fix netease config in driver

This commit is contained in:
wangzijiao 2018-12-05 17:35:03 +08:00
parent 24a1ec88ff
commit 57116ffcc0
9 changed files with 49 additions and 7 deletions

View File

@ -666,6 +666,14 @@ config LEDS_MLXCPLD
This option enabled support for the LEDs on the Mellanox
boards. Say Y to enabled these.
config LEDS_SUNXI
tristate "LED support for Allwinner platforms"
depends on ARCH_SUNXI
depends on LEDS_CLASS
help
This option enabled support for the LEDs on the Allwinner
platforms. Say Y to enabled these.
comment "LED Triggers"
source "drivers/leds/trigger/Kconfig"

View File

@ -71,6 +71,7 @@ obj-$(CONFIG_LEDS_IS31FL319X) += leds-is31fl319x.o
obj-$(CONFIG_LEDS_IS31FL32XX) += leds-is31fl32xx.o
obj-$(CONFIG_LEDS_PM8058) += leds-pm8058.o
obj-$(CONFIG_LEDS_MLXCPLD) += leds-mlxcpld.o
obj-$(CONFIG_LEDS_SUNXI) += leds-sunxi.o
#for AW2016 LED Driver
obj-$(CONFIG_LEDS_AW2016) += leds-aw2016.o

View File

@ -188,6 +188,7 @@ void led_blink_set(struct led_classdev *led_cdev,
{
del_timer_sync(&led_cdev->blink_timer);
led_cdev->flags &= ~LED_BLINK_SW;
led_cdev->flags &= ~LED_BLINK_ONESHOT;
led_cdev->flags &= ~LED_BLINK_ONESHOT_STOP;

View File

@ -269,6 +269,7 @@ static int __init cpld_r311_probe(struct platform_device *pdev) {
}
gpionum = -1;
gpionum = of_get_named_gpio_flags(np, "4v5_ldo_en", 0,
(enum of_gpio_flags *)&cfg);
if (gpio_is_valid(gpionum)) {
@ -279,16 +280,19 @@ static int __init cpld_r311_probe(struct platform_device *pdev) {
printk("Set 4v5_ldo_en fail\n");
}
gpionum = -1;
gpionum =
of_get_named_gpio_flags(np, "3v_ldo_en", 0, (enum of_gpio_flags *)&cfg);
if (gpio_is_valid(gpionum)) {
gpio_request(gpionum, "3v_ldo_en");
gpio_direction_output(gpionum, 1);
gpio_free(gpionum);
printk("Set 3v_ldo_en(%d) success\n", gpionum);
} else {
printk("Set 3v_ldo_en fail\n");
}
gpionum = -1;
gpionum = of_get_named_gpio_flags(np, "gp_adc_rst", 0,
(enum of_gpio_flags *)&cfg);
gpio_adc_rst = gpionum;

View File

@ -91,6 +91,7 @@
#define DRQDST_OTG_EP3 32
#define DRQDST_OTG_EP4 33
#define DRQDST_OTG_EP5 34
#define DRQSRC_MAD_TX 44
#define DRQDST_LEDC 45
#endif /*__DMA_SUN50IW8__ */

View File

@ -91,6 +91,6 @@
#define DRQDST_OTG_EP3 32
#define DRQDST_OTG_EP4 33
#define DRQDST_OTG_EP5 34
#define DRQDST_LEDC 45
#endif /*__DMA_SUN8IW15__ */

@ -1 +1 @@
Subproject commit 765523be4e352b63d58e07b964a6c4bac42f2512
Subproject commit d2c397aa21c5fccf9a621f893ca8441c450e893b

View File

@ -101,6 +101,7 @@ CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_BCM=y
# CONFIG_BT_HCIUART_INTEL is not set
# CONFIG_BT_HCIUART_MRVL is not set
# CONFIG_BT_LEDS is not set
# CONFIG_BT_RTKBTUSB is not set
# CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE is not set
CONFIG_BUILD_BIN2C=y
@ -420,6 +421,7 @@ CONFIG_HID=y
# CONFIG_HID_ALPS is not set
# CONFIG_HID_CMEDIA is not set
CONFIG_HID_GENERIC=y
# CONFIG_HID_LED is not set
CONFIG_HIGHMEM=y
CONFIG_HIGHPTE=y
# CONFIG_HISI_FEMAC is not set
@ -524,6 +526,18 @@ CONFIG_KEYBOARD_NETEASE_PV1_CES=y
# CONFIG_KEYBOARD_SUN4I_LRADC is not set
CONFIG_KEYBOARD_SUNXI=y
# CONFIG_KS7010 is not set
# CONFIG_LEDS_AAT1290 is not set
# CONFIG_LEDS_AW2016 is not set
CONFIG_LEDS_CLASS_FLASH=y
# CONFIG_LEDS_IS31FL319X is not set
# CONFIG_LEDS_IS31FL32XX is not set
# CONFIG_LEDS_KTD2692 is not set
# CONFIG_LEDS_SUNXI is not set
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
CONFIG_LEDS_TRIGGER_GPIO=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_ONESHOT=y
# CONFIG_LEDS_TRIGGER_PANIC is not set
CONFIG_LIBFDT=y
# CONFIG_LNET is not set
CONFIG_LOCK_SPIN_ON_OWNER=y
@ -535,6 +549,7 @@ CONFIG_MAC80211_DEBUGFS=y
# CONFIG_MAC80211_DEBUG_MENU is not set
CONFIG_MAC80211_HAS_RC=y
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_MAC80211_LEDS is not set
# CONFIG_MAC80211_MESH is not set
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
@ -605,7 +620,6 @@ CONFIG_NET_KEY=y
CONFIG_NET_VENDOR_ALLWINNER=y
CONFIG_NET_VENDOR_AMAZON=y
CONFIG_NET_VENDOR_NETRONOME=y
# CONFIG_NEW_LEDS is not set
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CONNTRACK_IPV4=y
@ -729,6 +743,7 @@ CONFIG_REGULATOR=y
CONFIG_RFKILL=y
# CONFIG_RFKILL_GPIO is not set
CONFIG_RFKILL_INPUT=y
CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_PM=y
CONFIG_RFKILL_REGULATOR=y
CONFIG_RFS_ACCEL=y
@ -942,6 +957,7 @@ CONFIG_USB_F_PTP=y
CONFIG_USB_GADGET=y
CONFIG_USB_HID=y
# CONFIG_USB_HSIC_USB4604 is not set
# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set
CONFIG_USB_LIBCOMPOSITE=y
CONFIG_USB_OHCI_HCD=y
# CONFIG_USB_OHCI_HCD_PLATFORM is not set
@ -975,6 +991,7 @@ CONFIG_USB_SUPPORT=y
CONFIG_USB_UAS=y
# CONFIG_USERIO is not set
CONFIG_USE_OF=y
# CONFIG_V4L2_FLASH_LED_CLASS is not set
CONFIG_V4L_PLATFORM_DRIVERS=y
# CONFIG_VDPO_DISP2_SUNXI is not set
CONFIG_VDSO=y

View File

@ -1680,7 +1680,7 @@ lv4_volt = 900
;
;----------------------------------------------------------------------------------
[leds]
leds_used = 1
leds_used = 0
leds_name = "aw2016_led"
leds_twi_id = 1
@ -1695,6 +1695,17 @@ hold-time-ms = 0
fall-time-ms = 6
off-time-ms = 4
[led_para]
compatible = "allwinner,sunxi-leds"
led_used = 1
led_count = 3
led1 = port:PL3<1><default><default><default>
led1_trigger = "none"
led2 = port:PL2<1><default><default><default>
led2_trigger = "none"
led3 = port:PH5<1><default><default><default>
led3_trigger = "none"
;--------------------------------------------------------------------------------
;digital amplifier control
;--------------------------------------------------------------------------------
@ -1730,5 +1741,4 @@ compatible = "allwinner,cpld-r311-pv1"
gp_adc_rst = port:PD21<1><1><default><1>
gp_cpld_rst = port:PL10<1><1><default><1>
4v5_ldo_en = port:PH04<1><default><default><0>
3v_ldo_en = port:PH05<1><default><default><0>
netease_io_regulator = "netease-io"
netease_io_regulator = "netease-io"