From: Linus Torvalds Date: Thu, 2 Jul 2015 02:09:11 +0000 (-0700) Subject: Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney... X-Git-Tag: v4.2-rc1~47 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=13d45f79a2af84de9083310db58b309a61065208;hp=-c;p=linux-2.6-block.git Merge branch 'for-next' of git://git./linux/kernel/git/cooloney/linux-leds Pull LED subsystem updates from Bryan Wu: "In this cycle, we finished to merge patches for LED Flash class driver. Other than that we have some bug fixes and new drivers for LED controllers" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (33 commits) leds:lp55xx: fix firmware loading error leds: fix max77693-led build errors leds: fix aat1290 build errors leds: aat1290: pass flags parameter to devm_gpiod_get leds: ktd2692: pass flags parameter to devm_gpiod_get drivers/leds: don't use module_init in non-modular leds-cobalt-raq.c leds: aat1290: add support for V4L2 Flash sub-device DT: aat1290: Document handling external strobe sources leds: max77693: add support for V4L2 Flash sub-device media: Add registration helpers for V4L2 flash sub-devices v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it Documentation: leds: Add description of v4l2-flash sub-device leds: add BCM6358 LED driver leds: add DT binding for BCM6358 LED controller leds: fix brightness changing when software blinking is active Documentation: leds-lp5523: describe master fader attributes leds: lp5523: add master_fader support leds: leds-gpio: Allow compile test if !GPIOLIB leds: leds-gpio: Add missing #include gpiolib: Add missing dummies for the unified device properties interface ... --- 13d45f79a2af84de9083310db58b309a61065208 diff --combined Documentation/devicetree/bindings/vendor-prefixes.txt index 7b607761b774,d48e9c8f1d84..347c8fdcf250 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@@ -40,7 -40,6 +40,7 @@@ calxeda Calxed capella Capella Microsystems, Inc cavium Cavium, Inc. cdns Cadence Design Systems Inc. +ceva Ceva, Inc. chipidea Chipidea, Inc chipone ChipOne chipspark ChipSPARK @@@ -53,17 -52,14 +53,17 @@@ cnxt Conexant Systems, Inc cortina Cortina Systems, Inc. cosmic Cosmic Circuits crystalfontz Crystalfontz America, Inc. +cubietech Cubietech, Ltd. dallas Maxim Integrated Products (formerly Dallas Semiconductor) davicom DAVICOM Semiconductor, Inc. +delta Delta Electronics, Inc. denx Denx Software Engineering digi Digi International Inc. digilent Diglent, Inc. dlg Dialog Semiconductor dlink D-Link Corporation dmo Data Modul AG +ea Embedded Artists AB ebv EBV Elektronik edt Emerging Display Technologies elan Elan Microelectronic Corp. @@@ -94,11 -90,9 +94,11 @@@ gumstix Gumstix, Inc gw Gateworks Corporation hannstar HannStar Display Corporation haoyu Haoyu Microelectronic Co. Ltd. +hardkernel Hardkernel Co., Ltd himax Himax Technologies, Inc. hisilicon Hisilicon Limited. hit Hitachi Ltd. +hitex Hitex Development Tools honeywell Honeywell hp Hewlett Packard i2se I2SE GmbH @@@ -106,7 -100,6 +106,7 @@@ ibm International Business Machines (IB idt Integrated Device Technologies, Inc. iom Iomega Corporation img Imagination Technologies Ltd. +ingenic Ingenic Semiconductor innolux Innolux Corporation intel Intel Corporation intercontrol Inter Control Group @@@ -114,6 -107,7 +114,7 @@@ isee ISEE 2007 S.L isil Intersil karo Ka-Ro electronics GmbH keymile Keymile GmbH + kinetic Kinetic Technologies lacie LaCie lantiq Lantiq Semiconductor lenovo Lenovo Group Ltd. @@@ -124,7 -118,6 +125,7 @@@ lltc Linear Technology Corporatio marvell Marvell Technology Group Ltd. maxim Maxim Integrated Products mediatek MediaTek Inc. +melexis Melexis N.V. merrii Merrii Technology Co., Ltd. micrel Micrel Inc. microchip Microchip Technology Inc. @@@ -162,16 -155,13 +163,16 @@@ powervr PowerVR (deprecated, use img qca Qualcomm Atheros, Inc. qcom Qualcomm Technologies, Inc qemu QEMU, a generic and open source machine emulator and virtualizer +qi Qi Hardware qnap QNAP Systems, Inc. radxa Radxa raidsonic RaidSonic Technology GmbH ralink Mediatek/Ralink Technology Corp. ramtron Ramtron International +raspberrypi Raspberry Pi Foundation realtek Realtek Semiconductor Corp. renesas Renesas Electronics Corporation +richtek Richtek Technology Corporation ricoh Ricoh Co. Ltd. rockchip Fuzhou Rockchip Electronics Co., Ltd samsung Samsung Semiconductor @@@ -192,7 -182,6 +193,7 @@@ skyworks Skyworks Solutions, Inc smsc Standard Microsystems Corporation snps Synopsys, Inc. solidrun SolidRun +solomon Solomon Systech Limited sony Sony Corporation spansion Spansion Inc. sprd Spreadtrum Communications Inc. @@@ -201,14 -190,12 +202,14 @@@ ste ST-Ericsso stericsson ST-Ericsson synology Synology, Inc. tbs TBS Technologies +tcl Toby Churchill Ltd. thine THine Electronics, Inc. ti Texas Instruments tlm Trusted Logic Mobility toradex Toradex AG toshiba Toshiba Corporation toumaz Toumaz +tplink TP-LINK Technologies Co., Ltd. truly Truly Semiconductors Limited usi Universal Scientific Industrial Co., Ltd. v3 V3 Semiconductor @@@ -216,7 -203,6 +217,7 @@@ variscite Variscite Ltd via VIA Technologies, Inc. virtio Virtual I/O Device Specification, developed by the OASIS consortium voipac Voipac Technologies s.r.o. +wexler Wexler winbond Winbond Electronics corp. wlf Wolfson Microelectronics wm Wondermedia Technologies, Inc. @@@ -226,4 -212,3 +227,4 @@@ xillybus Xillybus Ltd xlnx Xilinx zyxel ZyXEL Communications Corp. zarlink Zarlink Semiconductor +zte ZTE Corp. diff --combined drivers/leds/Kconfig index 4191614c4651,06b6070141fa..9ad35f72ab4c --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@@ -11,6 -11,9 +11,6 @@@ menuconfig NEW_LED Say Y to enable Linux LED support. This allows control of supported LEDs from both userspace and optionally, by kernel events (triggers). - This is not related to standard keyboard LEDs which are controlled - via the input system. - if NEW_LEDS config LEDS_CLASS @@@ -39,6 -42,32 +39,32 @@@ config LEDS_88PM860 This option enables support for on-chip LED drivers found on Marvell Semiconductor 88PM8606 PMIC. + config LEDS_AAT1290 + tristate "LED support for the AAT1290" + depends on LEDS_CLASS_FLASH + depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS + depends on GPIOLIB + depends on OF + depends on PINCTRL + help + This option enables support for the LEDs on the AAT1290. + + config LEDS_BCM6328 + tristate "LED Support for Broadcom BCM6328" + depends on LEDS_CLASS + depends on OF + help + This option enables support for LEDs connected to the BCM6328 + LED HW controller accessed via MMIO registers. + + config LEDS_BCM6358 + tristate "LED Support for Broadcom BCM6358" + depends on LEDS_CLASS + depends on OF + help + This option enables support for LEDs connected to the BCM6358 + LED HW controller accessed via MMIO registers. + config LEDS_LM3530 tristate "LCD Backlight driver for LM3530" depends on LEDS_CLASS @@@ -179,7 -208,7 +205,7 @@@ config LEDS_PCA9532_GPI config LEDS_GPIO tristate "LED Support for GPIO connected LEDs" depends on LEDS_CLASS - depends on GPIOLIB + depends on GPIOLIB || COMPILE_TEST help This option enables support for the LEDs connected to GPIO outputs. To be useful the particular board must have LEDs @@@ -203,6 -232,7 +229,7 @@@ config LEDS_LP55XX_COMMO tristate "Common Driver for TI/National LP5521/5523/55231/5562/8501" depends on LEDS_LP5521 || LEDS_LP5523 || LEDS_LP5562 || LEDS_LP8501 select FW_LOADER + select FW_LOADER_USER_HELPER_FALLBACK help This option supports common operations for LP5521/5523/55231/5562/8501 devices. @@@ -464,6 -494,25 +491,25 @@@ config LEDS_TCA650 LED driver chips accessed via the I2C bus. Driver support brightness control and hardware-assisted blinking. + config LEDS_TLC591XX + tristate "LED driver for TLC59108 and TLC59116 controllers" + depends on LEDS_CLASS && I2C + select REGMAP_I2C + help + This option enables support for Texas Instruments TLC59108 + and TLC59116 LED controllers. + + config LEDS_MAX77693 + tristate "LED support for MAX77693 Flash" + depends on LEDS_CLASS_FLASH + depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS + depends on MFD_MAX77693 + depends on OF + help + This option enables support for the flash part of the MAX77693 + multifunction device. It has build in control for two leds in flash + and torch mode. + config LEDS_MAX8997 tristate "LED support for MAX8997 PMIC" depends on LEDS_CLASS && MFD_MAX8997 @@@ -495,6 -544,15 +541,15 @@@ config LEDS_MENF21BM This driver can also be built as a module. If so the module will be called leds-menf21bmc. + config LEDS_KTD2692 + tristate "LED support for KTD2692 flash LED controller" + depends on LEDS_CLASS_FLASH && GPIOLIB && OF + help + This option enables support for KTD2692 LED flash connected + through ExpressWire interface. + + Say Y to enable this driver. + comment "LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)" config LEDS_BLINKM diff --combined drivers/leds/led-class.c index 7fb2a19ac649,adc38d14576b..beabfbc6f7cd --- a/drivers/leds/led-class.c +++ b/drivers/leds/led-class.c @@@ -121,6 -121,11 +121,11 @@@ static void led_timer_function(unsigne brightness = led_get_brightness(led_cdev); if (!brightness) { /* Time to switch the LED on. */ + if (led_cdev->delayed_set_value) { + led_cdev->blink_brightness = + led_cdev->delayed_set_value; + led_cdev->delayed_set_value = 0; + } brightness = led_cdev->blink_brightness; delay = led_cdev->blink_delay_on; } else { @@@ -187,7 -192,6 +192,7 @@@ void led_classdev_resume(struct led_cla } EXPORT_SYMBOL_GPL(led_classdev_resume); +#ifdef CONFIG_PM_SLEEP static int led_suspend(struct device *dev) { struct led_classdev *led_cdev = dev_get_drvdata(dev); @@@ -207,9 -211,11 +212,9 @@@ static int led_resume(struct device *de return 0; } +#endif -static const struct dev_pm_ops leds_class_dev_pm_ops = { - .suspend = led_suspend, - .resume = led_resume, -}; +static SIMPLE_DEV_PM_OPS(leds_class_dev_pm_ops, led_suspend, led_resume); static int match_name(struct device *dev, const void *data) { diff --combined drivers/leds/leds-gpio.c index d2d54d62afee,3af4f2bff83f..af1876a3a77c --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@@ -16,6 -16,7 +16,7 @@@ #include #include #include + #include #include #include #include @@@ -191,15 -192,17 +192,17 @@@ static struct gpio_leds_priv *gpio_leds goto err; } - np = of_node(child); + np = to_of_node(child); if (fwnode_property_present(child, "label")) { fwnode_property_read_string(child, "label", &led.name); } else { if (IS_ENABLED(CONFIG_OF) && !led.name && np) led.name = np->name; - if (!led.name) - return ERR_PTR(-EINVAL); + if (!led.name) { + ret = -EINVAL; + goto err; + } } fwnode_property_read_string(child, "linux,default-trigger", &led.default_trigger); @@@ -217,18 -220,19 +220,19 @@@ if (fwnode_property_present(child, "retain-state-suspended")) led.retain_state_suspended = 1; - ret = create_gpio_led(&led, &priv->leds[priv->num_leds++], + ret = create_gpio_led(&led, &priv->leds[priv->num_leds], dev, NULL); if (ret < 0) { fwnode_handle_put(child); goto err; } + priv->num_leds++; } return priv; err: - for (count = priv->num_leds - 2; count >= 0; count--) + for (count = priv->num_leds - 1; count >= 0; count--) delete_gpio_led(&priv->leds[count]); return ERR_PTR(ret); } diff --combined drivers/media/v4l2-core/Kconfig index f7a01a72eb9e,c505dc33e4db..b4b022933e29 --- a/drivers/media/v4l2-core/Kconfig +++ b/drivers/media/v4l2-core/Kconfig @@@ -44,6 -44,17 +44,17 @@@ config V4L2_MEM2MEM_DE tristate depends on VIDEOBUF2_CORE + # Used by LED subsystem flash drivers + config V4L2_FLASH_LED_CLASS + tristate "V4L2 flash API for LED flash class devices" + depends on VIDEO_V4L2_SUBDEV_API + depends on LEDS_CLASS_FLASH + ---help--- + Say Y here to enable V4L2 flash API support for LED flash + class drivers. + + When in doubt, say N. + # Used by drivers that need Videobuf modules config VIDEOBUF_GEN tristate @@@ -89,7 -100,7 +100,7 @@@ config VIDEOBUF2_VMALLO config VIDEOBUF2_DMA_SG tristate - #depends on HAS_DMA + depends on HAS_DMA select VIDEOBUF2_CORE select VIDEOBUF2_MEMOPS diff --combined include/linux/gpio/consumer.h index fd098169fe87,da042657dc31..adac255aee86 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@@ -100,25 -100,24 +100,25 @@@ int gpiod_direction_output_raw(struct g /* Value get/set from non-sleeping context */ int gpiod_get_value(const struct gpio_desc *desc); void gpiod_set_value(struct gpio_desc *desc, int value); -void gpiod_set_array(unsigned int array_size, - struct gpio_desc **desc_array, int *value_array); +void gpiod_set_array_value(unsigned int array_size, + struct gpio_desc **desc_array, int *value_array); int gpiod_get_raw_value(const struct gpio_desc *desc); void gpiod_set_raw_value(struct gpio_desc *desc, int value); -void gpiod_set_raw_array(unsigned int array_size, - struct gpio_desc **desc_array, int *value_array); +void gpiod_set_raw_array_value(unsigned int array_size, + struct gpio_desc **desc_array, + int *value_array); /* Value get/set from sleeping context */ int gpiod_get_value_cansleep(const struct gpio_desc *desc); void gpiod_set_value_cansleep(struct gpio_desc *desc, int value); -void gpiod_set_array_cansleep(unsigned int array_size, - struct gpio_desc **desc_array, - int *value_array); +void gpiod_set_array_value_cansleep(unsigned int array_size, + struct gpio_desc **desc_array, + int *value_array); int gpiod_get_raw_value_cansleep(const struct gpio_desc *desc); void gpiod_set_raw_value_cansleep(struct gpio_desc *desc, int value); -void gpiod_set_raw_array_cansleep(unsigned int array_size, - struct gpio_desc **desc_array, - int *value_array); +void gpiod_set_raw_array_value_cansleep(unsigned int array_size, + struct gpio_desc **desc_array, + int *value_array); int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce); @@@ -305,9 -304,9 +305,9 @@@ static inline void gpiod_set_value(stru /* GPIO can never have been requested */ WARN_ON(1); } -static inline void gpiod_set_array(unsigned int array_size, - struct gpio_desc **desc_array, - int *value_array) +static inline void gpiod_set_array_value(unsigned int array_size, + struct gpio_desc **desc_array, + int *value_array) { /* GPIO can never have been requested */ WARN_ON(1); @@@ -323,9 -322,9 +323,9 @@@ static inline void gpiod_set_raw_value( /* GPIO can never have been requested */ WARN_ON(1); } -static inline void gpiod_set_raw_array(unsigned int array_size, - struct gpio_desc **desc_array, - int *value_array) +static inline void gpiod_set_raw_array_value(unsigned int array_size, + struct gpio_desc **desc_array, + int *value_array) { /* GPIO can never have been requested */ WARN_ON(1); @@@ -342,7 -341,7 +342,7 @@@ static inline void gpiod_set_value_cans /* GPIO can never have been requested */ WARN_ON(1); } -static inline void gpiod_set_array_cansleep(unsigned int array_size, +static inline void gpiod_set_array_value_cansleep(unsigned int array_size, struct gpio_desc **desc_array, int *value_array) { @@@ -361,7 -360,7 +361,7 @@@ static inline void gpiod_set_raw_value_ /* GPIO can never have been requested */ WARN_ON(1); } -static inline void gpiod_set_raw_array_cansleep(unsigned int array_size, +static inline void gpiod_set_raw_array_value_cansleep(unsigned int array_size, struct gpio_desc **desc_array, int *value_array) { @@@ -407,6 -406,21 +407,21 @@@ static inline int desc_to_gpio(const st return -EINVAL; } + /* Child properties interface */ + struct fwnode_handle; + + static inline struct gpio_desc *fwnode_get_named_gpiod( + struct fwnode_handle *fwnode, const char *propname) + { + return ERR_PTR(-ENOSYS); + } + + static inline struct gpio_desc *devm_get_gpiod_from_child( + struct device *dev, const char *con_id, struct fwnode_handle *child) + { + return ERR_PTR(-ENOSYS); + } + #endif /* CONFIG_GPIOLIB */ /* @@@ -450,6 -464,7 +465,6 @@@ int gpiod_export(struct gpio_desc *desc, bool direction_may_change); int gpiod_export_link(struct device *dev, const char *name, struct gpio_desc *desc); -int gpiod_sysfs_set_active_low(struct gpio_desc *desc, int value); void gpiod_unexport(struct gpio_desc *desc); #else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */ @@@ -466,6 -481,11 +481,6 @@@ static inline int gpiod_export_link(str return -ENOSYS; } -static inline int gpiod_sysfs_set_active_low(struct gpio_desc *desc, int value) -{ - return -ENOSYS; -} - static inline void gpiod_unexport(struct gpio_desc *desc) { } diff --combined include/media/v4l2-subdev.h index dc20102ff600,bf9c7f2169d1..4e18318eb425 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@@ -40,8 -40,6 +40,8 @@@ #define V4L2_SUBDEV_IR_TX_NOTIFY _IOW('v', 1, u32) #define V4L2_SUBDEV_IR_TX_FIFO_SERVICE_REQ 0x00000001 +#define V4L2_DEVICE_NOTIFY_EVENT _IOW('v', 2, struct v4l2_event) + struct v4l2_device; struct v4l2_ctrl_handler; struct v4l2_event_subscription; @@@ -295,6 -293,14 +295,6 @@@ struct v4l2_mbus_frame_desc g_dv_timings(): Get custom dv timings in the sub device. - enum_mbus_fmt: enumerate pixel formats, provided by a video data source - - g_mbus_fmt: get the current pixel format, provided by a video data source - - try_mbus_fmt: try to set a pixel format on a video data source - - s_mbus_fmt: set a pixel format on a video data source - g_mbus_config: get supported mediabus configurations s_mbus_config: set a certain mediabus configuration. This operation is added @@@ -332,6 -338,14 +332,6 @@@ struct v4l2_subdev_video_ops struct v4l2_dv_timings *timings); int (*query_dv_timings)(struct v4l2_subdev *sd, struct v4l2_dv_timings *timings); - int (*enum_mbus_fmt)(struct v4l2_subdev *sd, unsigned int index, - u32 *code); - int (*g_mbus_fmt)(struct v4l2_subdev *sd, - struct v4l2_mbus_framefmt *fmt); - int (*try_mbus_fmt)(struct v4l2_subdev *sd, - struct v4l2_mbus_framefmt *fmt); - int (*s_mbus_fmt)(struct v4l2_subdev *sd, - struct v4l2_mbus_framefmt *fmt); int (*g_mbus_config)(struct v4l2_subdev *sd, struct v4l2_mbus_config *cfg); int (*s_mbus_config)(struct v4l2_subdev *sd, @@@ -605,6 -619,8 +605,8 @@@ struct v4l2_subdev struct video_device *devnode; /* pointer to the physical device, if any */ struct device *dev; + /* The device_node of the subdev, usually the same as dev->of_node. */ + struct device_node *of_node; /* Links this subdev to a global subdev_list or @notifier->done list. */ struct list_head async_list; /* Pointer to respective struct v4l2_async_subdev. */