new LoCoMo driver set
Subsystems (12)
v5 cover new LoCoMo driver set
Hello,
Russell, I understand that you are quite busy. Could you please find a small amount of time to review and comment/ack the sa1100/collie-related parts of the patchset. It looks like this serie misses only your blessing.
Lee have agreed to merge this through the MFD tree, and the respective subsystem maintainers are also fine with this.
Changes since V4:
* Added all Acked-by lines.
* Dropped the SPI patch - no reaction from Mark Brown onto the latest version of the patch. It can go separately, as it adds new functionality.
The following changes since commit b787f68c36d49bb1d9236f403813641efa74a031:
Linux 4.1-rc1 (2015-04-26 17:59:10 -0700)
are available in the git repository at:
git://git.infradead.org/users/dbaryshkov/zaurus.git locomo-v5
for you to fetch changes up to 736e2f3b9c71c8baa0a260fcabe9a979e9bd8d5c:
ARM: drop old LoCoMo driver (2015-06-08 23:36:10 +0300)
----------------------------------------------------------------
Dmitry Eremin-Solenikov (17):
mfd: add new driver for Sharp LoCoMo
leds: port locomo leds driver to new locomo core
input: convert LoCoMo keyboard driver to use new locomo core
input: locomokbd: differentiate between two Enter keys
input: make LoCoMo keyboard driver support both poodle and collie
video: backlight: add new locomo backlight driver
video: lcd: add LoCoMo LCD driver
gpio: port LoCoMo gpio support from old driver
gpio: locomo: implement per-pin irq handling
i2c: add locomo i2c driver
ARM: sa1100: make collie use new locomo drivers
ARM: sa1100: don't preallocate IRQ space for locomo
ASoC: pxa: poodle: make use of new locomo GPIO interface
ARM: pxa: poodle: use new LoCoMo driver
ARM: pxa: poodle: don't preallocate IRQ space for locomo
video: backlight: drop old locomo bl/lcd driver
ARM: drop old LoCoMo driver
arch/arm/common/Kconfig | 3 - arch/arm/common/Makefile | 1 - arch/arm/common/locomo.c | 914 ----------------------------- arch/arm/include/asm/hardware/locomo.h | 221 ------- arch/arm/mach-pxa/Kconfig | 1 - arch/arm/mach-pxa/include/mach/poodle.h | 8 +- arch/arm/mach-pxa/poodle.c | 58 +- arch/arm/mach-sa1100/Kconfig | 1 - arch/arm/mach-sa1100/collie.c | 213 +++++-- arch/arm/mach-sa1100/include/mach/collie.h | 16 +- arch/arm/mach-sa1100/include/mach/irqs.h | 19 +- drivers/gpio/Kconfig | 13 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-locomo.c | 285 +++++++++ drivers/i2c/busses/Kconfig | 12 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-locomo.c | 135 +++++ drivers/input/keyboard/Kconfig | 2 +- drivers/input/keyboard/locomokbd.c | 262 ++++----- drivers/leds/Kconfig | 2 +- drivers/leds/leds-locomo.c | 117 ++-- drivers/mfd/Kconfig | 10 + drivers/mfd/Makefile | 1 + drivers/mfd/locomo.c | 336 +++++++++++ drivers/video/backlight/Kconfig | 16 +- drivers/video/backlight/Makefile | 3 +- drivers/video/backlight/locomo_bl.c | 153 +++++ drivers/video/backlight/locomo_lcd.c | 285 +++++++++ drivers/video/backlight/locomolcd.c | 255 -------- include/linux/mfd/locomo.h | 169 ++++++ sound/soc/pxa/poodle.c | 52 +- 31 files changed, 1862 insertions(+), 1703 deletions(-) delete mode 100644 arch/arm/common/locomo.c delete mode 100644 arch/arm/include/asm/hardware/locomo.h create mode 100644 drivers/gpio/gpio-locomo.c create mode 100644 drivers/i2c/busses/i2c-locomo.c create mode 100644 drivers/mfd/locomo.c create mode 100644 drivers/video/backlight/locomo_bl.c create mode 100644 drivers/video/backlight/locomo_lcd.c delete mode 100644 drivers/video/backlight/locomolcd.c create mode 100644 include/linux/mfd/locomo.h
PATCH v5 1/17 mfd: add new driver for Sharp LoCoMo
LoCoMo is a GA used on Sharp Zaurus SL-5x00. Current driver does has several design issues (special bus instead of platform bus, doesn't use mfd-core, etc).
Implement 'core' parts of locomo support as an mfd driver.
--- drivers/mfd/Kconfig | 10 ++ drivers/mfd/Makefile | 1 + drivers/mfd/locomo.c | 336 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/locomo.h | 169 +++++++++++++++++++++++ 4 files changed, 516 insertions(+) create mode 100644 drivers/mfd/locomo.c create mode 100644 include/linux/mfd/locomo.h
drivers/mfd/Kconfig +10 -0
@@ -1430,6 +1430,16 @@ config MFD_STW481X in various ST Microelectronics and ST-Ericsson embedded Nomadik series. +config MFD_LOCOMO + bool "Sharp LoCoMo support" + depends on ARM + select MFD_CORE + select IRQ_DOMAIN + select REGMAP_MMIO + help + Support for Sharp LoCoMo Grid Array found in Sharp SL-5x00 + PDA family. + menu "Multimedia Capabilities Port drivers" depends on ARCH_SA1100
drivers/mfd/Makefile +1 -0
@@ -181,6 +181,7 @@ obj-$(CONFIG_MFD_HI6421_PMIC) += hi6421-pmic-core.o obj-$(CONFIG_MFD_DLN2) += dln2.o obj-$(CONFIG_MFD_RT5033) += rt5033.o obj-$(CONFIG_MFD_SKY81452) += sky81452.o +obj-$(CONFIG_MFD_LOCOMO) += locomo.o intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o
drivers/mfd/locomo.c new file +336 -0
336 lines not on this page · raw message
include/linux/mfd/locomo.h new file +169 -0
169 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v5 2/17 leds: port locomo leds driver to new locomo core
In reply to Dmitry Eremin-SolenikovAdapt locomo leds driver to new locomo core setup.
--- drivers/leds/Kconfig | 2 +- drivers/leds/leds-locomo.c | 117 +++++++++++++++++++++++---------------------- 2 files changed, 61 insertions(+), 58 deletions(-)
drivers/leds/Kconfig +1 -1
@@ -79,7 +79,7 @@ config LEDS_LM3642 config LEDS_LOCOMO tristate "LED Support for Locomo device" depends on LEDS_CLASS - depends on SHARP_LOCOMO + depends on MFD_LOCOMO help This option enables support for the LEDs on Sharp Locomo. Zaurus models SL-5500 and SL-5600.
drivers/leds/leds-locomo.c +60 -57
149 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v5 2/17 leds: port locomo leds driver to new locomo core
Quoted 4 lines · Dmitry Eremin-Solenikov
Adapt locomo leds driver to new locomo core setup.
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Acked-by Jacek Anaszewski <[email protected]>
This is missing Bryan's Ack.
Quoted 172 lines
--- drivers/leds/Kconfig | 2 +- drivers/leds/leds-locomo.c | 117 +++++++++++++++++++++++---------------------- 2 files changed, 61 insertions(+), 58 deletions(-)drivers/leds/Kconfig +1
-1@@ -79,7 +79,7 @@ config LEDS_LM3642 config LEDS_LOCOMO tristate "LED Support for Locomo device" depends on LEDS_CLASS - depends on SHARP_LOCOMO + depends on MFD_LOCOMO help This option enables support for the LEDs on Sharp Locomo. Zaurus models SL-5500 and SL-5600.drivers/leds/leds-locomo.c +60
-57@@ -9,89 +9,92 @@*/ #include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> #include <linux/leds.h> +#include <linux/mfd/locomo.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> -#include <mach/hardware.h> -#include <asm/hardware/locomo.h> +struct locomo_led { +struct led_classdev led; +struct regmap *regmap; +unsigned int reg; +};static void locomoled_brightness_set (struct led_classdev *led_cdev, -enum led_brightness value,int offset) -{ -struct locomo_dev *locomo_dev =LOCOMO_DEV (led_cdev->dev->parent); -unsigned long flags; - -local_irq_save (flags); -if (value) -locomo_writel (LOCOMO_LPT_TOFH , locomo_dev->mapbase + offset); -else -locomo_writel (LOCOMO_LPT_TOFL , locomo_dev->mapbase + offset); -local_irq_restore (flags); -} - -static void locomoled_brightness_set0 (struct led_classdev *led_cdev,enum led_brightness value) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT0 ); + struct locomo_led *led = container_of(led_cdev, struct locomo_led, led); + +regmap_write (led->regmap, led->reg, + value ?LOCOMO_LPT_TOFH :LOCOMO_LPT_TOFL ); } -static void locomoled_brightness_set1 (struct led_classdev *led_cdev, -enum led_brightness value) +static int locomo_led_register ( +struct device *dev, +struct locomo_led *led, +const char *name, +const char *trigger, +struct regmap *regmap, +unsigned int reg) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT1 ); + led->led.name = name; + led->led.flags =LED_CORE_SUSPENDRESUME ; + led->led.default_trigger = trigger; + led->led.brightness_set = locomoled_brightness_set; + led->regmap = regmap; + led->reg = reg; + +return devm_led_classdev_register (dev, &led->led); } -static struct led_classdev locomo_led0 = { - .name ="locomo:amber:charge" , - .default_trigger ="main-battery-charging" , - .brightness_set = locomoled_brightness_set0, -}; - -static struct led_classdev locomo_led1 = { - .name ="locomo:green:mail" , - .default_trigger ="nand-disk" , - .brightness_set = locomoled_brightness_set1, -}; - -static int locomoled_probe (struct locomo_dev *ldev) +static int locomoled_probe (struct platform_device *pdev) {int ret; - - ret =led_classdev_register (&ldev->dev, &locomo_led0); +struct locomo_led *leds; +struct regmap *regmap; + + leds =devm_kzalloc (&pdev->dev,2 *sizeof (*leds),GFP_KERNEL ); +if (!leds) +return -ENOMEM ; + + regmap =dev_get_regmap (pdev->dev.parent,NULL ); +if (!regmap) +return -ENODEV ; + + ret =locomo_led_register ( + &pdev->dev, + leds, +"locomo:amber:charge" , +"main-battery-charging" , + regmap, +LOCOMO_LPT0 );if (ret <0 )return ret; - ret =led_classdev_register (&ldev->dev, &locomo_led1); + ret =locomo_led_register ( + &pdev->dev, + leds +1 , +"locomo:green:mail" , +"mmc0" , + regmap, +LOCOMO_LPT1 );if (ret <0 ) -led_classdev_unregister (&locomo_led0); - -return ret; -} +return ret; -static int locomoled_remove (struct locomo_dev *dev) -{ -led_classdev_unregister (&locomo_led0); -led_classdev_unregister (&locomo_led1);return 0 ; } -static struct locomo_driver locomoled_driver = { - .drv = { - .name ="locomoled" +static struct platform_driver locomoled_driver = { + .driver = { + .name ="locomo-led" }, - .devid =LOCOMO_DEVID_LED , .probe = locomoled_probe, - .remove = locomoled_remove, }; -static int __init locomoled_init (void ) -{ -return locomo_driver_register (&locomoled_driver); -} -module_init (locomoled_init); +module_platform_driver (locomoled_driver);MODULE_AUTHOR ("John Lenz <[email protected]>" );MODULE_DESCRIPTION ("Locomo LED driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:locomo-led" );
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v5 2/17 leds: port locomo leds driver to new locomo core
2015-06-09 9:57 GMT+03:00 Lee Jones <[email protected]>:
Quoted 8 lines · Dmitry Eremin-Solenikov
Quoted 5 lines
Adapt locomo leds driver to new locomo core setup.
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Acked-by Jacek Anaszewski <[email protected]>This is missing Bryan's Ack.
Jacek is listed as a co-maintainer of the LEDS subsystem, so I assumed that his acked-by is enough.
Quoted 179 lines
Quoted 163 lines
--- drivers/leds/Kconfig | 2 +- drivers/leds/leds-locomo.c | 117 +++++++++++++++++++++++---------------------- 2 files changed, 61 insertions(+), 58 deletions(-)drivers/leds/Kconfig +1
-1@@ -79,7 +79,7 @@ config LEDS_LM3642 config LEDS_LOCOMO tristate "LED Support for Locomo device" depends on LEDS_CLASS - depends on SHARP_LOCOMO + depends on MFD_LOCOMO help This option enables support for the LEDs on Sharp Locomo. Zaurus models SL-5500 and SL-5600.drivers/leds/leds-locomo.c +58
-53@@ -9,89 +9,92 @@*/ #include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> #include <linux/leds.h> +#include <linux/mfd/locomo.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> -#include <mach/hardware.h> -#include <asm/hardware/locomo.h> +struct locomo_led { +struct led_classdev led; +struct regmap *regmap; +unsigned int reg; +};static void locomoled_brightness_set (struct led_classdev *led_cdev, -enum led_brightness value,int offset) -{ -struct locomo_dev *locomo_dev =LOCOMO_DEV (led_cdev->dev->parent); -unsigned long flags; - -local_irq_save (flags); -if (value) -locomo_writel (LOCOMO_LPT_TOFH , locomo_dev->mapbase + offset); -else -locomo_writel (LOCOMO_LPT_TOFL , locomo_dev->mapbase + offset); -local_irq_restore (flags); -} - -static void locomoled_brightness_set0 (struct led_classdev *led_cdev,enum led_brightness value) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT0 ); + struct locomo_led *led = container_of(led_cdev, struct locomo_led, led); + +regmap_write (led->regmap, led->reg, + value ?LOCOMO_LPT_TOFH :LOCOMO_LPT_TOFL ); } -static void locomoled_brightness_set1 (struct led_classdev *led_cdev, -enum led_brightness value) +static int locomo_led_register ( +struct device *dev, +struct locomo_led *led, +const char *name, +const char *trigger, +struct regmap *regmap, +unsigned int reg) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT1 ); + led->led.name = name; + led->led.flags =LED_CORE_SUSPENDRESUME ; + led->led.default_trigger = trigger; + led->led.brightness_set = locomoled_brightness_set; + led->regmap = regmap; + led->reg = reg; + +return devm_led_classdev_register (dev, &led->led); } -static struct led_classdev locomo_led0 = { - .name ="locomo:amber:charge" , - .default_trigger ="main-battery-charging" , - .brightness_set = locomoled_brightness_set0, -}; - -static struct led_classdev locomo_led1 = { - .name ="locomo:green:mail" , - .default_trigger ="nand-disk" , - .brightness_set = locomoled_brightness_set1, -}; - -static int locomoled_probe (struct locomo_dev *ldev) +static int locomoled_probe (struct platform_device *pdev) {int ret; - - ret =led_classdev_register (&ldev->dev, &locomo_led0); +struct locomo_led *leds; +struct regmap *regmap; + + leds =devm_kzalloc (&pdev->dev,2 *sizeof (*leds),GFP_KERNEL ); +if (!leds) +return -ENOMEM ; + + regmap =dev_get_regmap (pdev->dev.parent,NULL ); +if (!regmap) +return -ENODEV ; + + ret =locomo_led_register ( + &pdev->dev, + leds, +"locomo:amber:charge" , +"main-battery-charging" , + regmap, +LOCOMO_LPT0 );if (ret <0 )return ret; - ret =led_classdev_register (&ldev->dev, &locomo_led1); + ret =locomo_led_register ( + &pdev->dev, + leds +1 , +"locomo:green:mail" , +"mmc0" , + regmap, +LOCOMO_LPT1 );if (ret <0 ) -led_classdev_unregister (&locomo_led0); - -return ret; -} +return ret; -static int locomoled_remove (struct locomo_dev *dev) -{ -led_classdev_unregister (&locomo_led0); -led_classdev_unregister (&locomo_led1);return 0 ; } -static struct locomo_driver locomoled_driver = { - .drv = { - .name ="locomoled" +static struct platform_driver locomoled_driver = { + .driver = { + .name ="locomo-led" }, - .devid =LOCOMO_DEVID_LED , .probe = locomoled_probe, - .remove = locomoled_remove, }; -static int __init locomoled_init (void )drivers/leds/leds-locomo.c line 100
Quoted 10 lines
drivers/leds/leds-locomo.c +2
-4-{ -return locomo_driver_register (&locomoled_driver); -} -module_init (locomoled_init); +module_platform_driver (locomoled_driver);MODULE_AUTHOR ("John Lenz <[email protected]>" );MODULE_DESCRIPTION ("Locomo LED driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:locomo-led" );--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Signature · 2 lines
With best wishes Dmitry
PATCH v5 2/17 leds: port locomo leds driver to new locomo core
Quoted 5 lines · Dmitry Eremin-Solenikov
2015-06-09 9:57 GMT+03:00 Lee Jones <[email protected]>:
Quoted 4 lines · Dmitry Eremin-Solenikov
Quoted 3 lines
Adapt locomo leds driver to new locomo core setup.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Acked-by Jacek Anaszewski <[email protected]>This is missing Bryan's Ack.
Jacek is listed as a co-maintainer of the LEDS subsystem, so I assumed that his acked-by is enough.
Ah, this is new.
Congratulations Jacek.
Ignore me then.
Quoted 176 lines
Quoted 173 lines
Quoted 172 lines
--- drivers/leds/Kconfig | 2 +- drivers/leds/leds-locomo.c | 117 +++++++++++++++++++++++---------------------- 2 files changed, 61 insertions(+), 58 deletions(-)drivers/leds/Kconfig +1
-1@@ -79,7 +79,7 @@ config LEDS_LM3642 config LEDS_LOCOMO tristate "LED Support for Locomo device" depends on LEDS_CLASS - depends on SHARP_LOCOMO + depends on MFD_LOCOMO help This option enables support for the LEDs on Sharp Locomo. Zaurus models SL-5500 and SL-5600.drivers/leds/leds-locomo.c +60
-57@@ -9,89 +9,92 @@*/ #include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> #include <linux/leds.h> +#include <linux/mfd/locomo.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> -#include <mach/hardware.h> -#include <asm/hardware/locomo.h> +struct locomo_led { +struct led_classdev led; +struct regmap *regmap; +unsigned int reg; +};static void locomoled_brightness_set (struct led_classdev *led_cdev, -enum led_brightness value,int offset) -{ -struct locomo_dev *locomo_dev =LOCOMO_DEV (led_cdev->dev->parent); -unsigned long flags; - -local_irq_save (flags); -if (value) -locomo_writel (LOCOMO_LPT_TOFH , locomo_dev->mapbase + offset); -else -locomo_writel (LOCOMO_LPT_TOFL , locomo_dev->mapbase + offset); -local_irq_restore (flags); -} - -static void locomoled_brightness_set0 (struct led_classdev *led_cdev,enum led_brightness value) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT0 ); + struct locomo_led *led = container_of(led_cdev, struct locomo_led, led); + +regmap_write (led->regmap, led->reg, + value ?LOCOMO_LPT_TOFH :LOCOMO_LPT_TOFL ); } -static void locomoled_brightness_set1 (struct led_classdev *led_cdev, -enum led_brightness value) +static int locomo_led_register ( +struct device *dev, +struct locomo_led *led, +const char *name, +const char *trigger, +struct regmap *regmap, +unsigned int reg) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT1 ); + led->led.name = name; + led->led.flags =LED_CORE_SUSPENDRESUME ; + led->led.default_trigger = trigger; + led->led.brightness_set = locomoled_brightness_set; + led->regmap = regmap; + led->reg = reg; + +return devm_led_classdev_register (dev, &led->led); } -static struct led_classdev locomo_led0 = { - .name ="locomo:amber:charge" , - .default_trigger ="main-battery-charging" , - .brightness_set = locomoled_brightness_set0, -}; - -static struct led_classdev locomo_led1 = { - .name ="locomo:green:mail" , - .default_trigger ="nand-disk" , - .brightness_set = locomoled_brightness_set1, -}; - -static int locomoled_probe (struct locomo_dev *ldev) +static int locomoled_probe (struct platform_device *pdev) {int ret; - - ret =led_classdev_register (&ldev->dev, &locomo_led0); +struct locomo_led *leds; +struct regmap *regmap; + + leds =devm_kzalloc (&pdev->dev,2 *sizeof (*leds),GFP_KERNEL ); +if (!leds) +return -ENOMEM ; + + regmap =dev_get_regmap (pdev->dev.parent,NULL ); +if (!regmap) +return -ENODEV ; + + ret =locomo_led_register ( + &pdev->dev, + leds, +"locomo:amber:charge" , +"main-battery-charging" , + regmap, +LOCOMO_LPT0 );if (ret <0 )return ret; - ret =led_classdev_register (&ldev->dev, &locomo_led1); + ret =locomo_led_register ( + &pdev->dev, + leds +1 , +"locomo:green:mail" , +"mmc0" , + regmap, +LOCOMO_LPT1 );if (ret <0 ) -led_classdev_unregister (&locomo_led0); - -return ret; -} +return ret; -static int locomoled_remove (struct locomo_dev *dev) -{ -led_classdev_unregister (&locomo_led0); -led_classdev_unregister (&locomo_led1);return 0 ; } -static struct locomo_driver locomoled_driver = { - .drv = { - .name ="locomoled" +static struct platform_driver locomoled_driver = { + .driver = { + .name ="locomo-led" }, - .devid =LOCOMO_DEVID_LED , .probe = locomoled_probe, - .remove = locomoled_remove, }; -static int __init locomoled_init (void ) -{ -return locomo_driver_register (&locomoled_driver); -} -module_init (locomoled_init); +module_platform_driver (locomoled_driver);MODULE_AUTHOR ("John Lenz <[email protected]>" );MODULE_DESCRIPTION ("Locomo LED driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:locomo-led" );
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v5 2/17 leds: port locomo leds driver to new locomo core
Quoted 10 lines · Lee Jones
Quoted 8 lines · Dmitry Eremin-Solenikov
2015-06-09 9:57 GMT+03:00 Lee Jones <[email protected]>:
Quoted 7 lines · Dmitry Eremin-Solenikov
Quoted 5 lines
Adapt locomo leds driver to new locomo core setup.
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Acked-by Jacek Anaszewski <[email protected]>
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
This is missing Bryan's Ack.
Jacek is listed as a co-maintainer of the LEDS subsystem, so I assumed that his acked-by is enough.
Ah, this is new.
Congratulations Jacek.
Thanks.
Quoted 1 line
Ignore me then.
I think that it should go via mfd tree, as this patch adds dependency on header linux/mfd/locomo.h, which is added in one of the preceding patches [1] in this series.
[1] [PATCH v3 01/17] mfd: add new driver for Sharp LoCoMo
Quoted 177 lines
Quoted 176 lines
Quoted 173 lines
Quoted 172 lines
--- drivers/leds/Kconfig | 2 +- drivers/leds/leds-locomo.c | 117 +++++++++++++++++++++++---------------------- 2 files changed, 61 insertions(+), 58 deletions(-)drivers/leds/Kconfig +1
-1@@ -79,7 +79,7 @@ config LEDS_LM3642 config LEDS_LOCOMO tristate "LED Support for Locomo device" depends on LEDS_CLASS - depends on SHARP_LOCOMO + depends on MFD_LOCOMO help This option enables support for the LEDs on Sharp Locomo. Zaurus models SL-5500 and SL-5600.drivers/leds/leds-locomo.c +60
-57@@ -9,89 +9,92 @@*/ #include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> #include <linux/leds.h> +#include <linux/mfd/locomo.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> -#include <mach/hardware.h> -#include <asm/hardware/locomo.h> +struct locomo_led { +struct led_classdev led; +struct regmap *regmap; +unsigned int reg; +};static void locomoled_brightness_set (struct led_classdev *led_cdev, -enum led_brightness value,int offset) -{ -struct locomo_dev *locomo_dev =LOCOMO_DEV (led_cdev->dev->parent); -unsigned long flags; - -local_irq_save (flags); -if (value) -locomo_writel (LOCOMO_LPT_TOFH , locomo_dev->mapbase + offset); -else -locomo_writel (LOCOMO_LPT_TOFL , locomo_dev->mapbase + offset); -local_irq_restore (flags); -} - -static void locomoled_brightness_set0 (struct led_classdev *led_cdev,enum led_brightness value) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT0 ); + struct locomo_led *led = container_of(led_cdev, struct locomo_led, led); + +regmap_write (led->regmap, led->reg, + value ?LOCOMO_LPT_TOFH :LOCOMO_LPT_TOFL ); } -static void locomoled_brightness_set1 (struct led_classdev *led_cdev, -enum led_brightness value) +static int locomo_led_register ( +struct device *dev, +struct locomo_led *led, +const char *name, +const char *trigger, +struct regmap *regmap, +unsigned int reg) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT1 ); + led->led.name = name; + led->led.flags =LED_CORE_SUSPENDRESUME ; + led->led.default_trigger = trigger; + led->led.brightness_set = locomoled_brightness_set; + led->regmap = regmap; + led->reg = reg; + +return devm_led_classdev_register (dev, &led->led); } -static struct led_classdev locomo_led0 = { - .name ="locomo:amber:charge" , - .default_trigger ="main-battery-charging" , - .brightness_set = locomoled_brightness_set0, -}; - -static struct led_classdev locomo_led1 = { - .name ="locomo:green:mail" , - .default_trigger ="nand-disk" , - .brightness_set = locomoled_brightness_set1, -}; - -static int locomoled_probe (struct locomo_dev *ldev) +static int locomoled_probe (struct platform_device *pdev) {int ret; - - ret =led_classdev_register (&ldev->dev, &locomo_led0); +struct locomo_led *leds; +struct regmap *regmap; + + leds =devm_kzalloc (&pdev->dev,2 *sizeof (*leds),GFP_KERNEL ); +if (!leds) +return -ENOMEM ; + + regmap =dev_get_regmap (pdev->dev.parent,NULL ); +if (!regmap) +return -ENODEV ; + + ret =locomo_led_register ( + &pdev->dev, + leds, +"locomo:amber:charge" , +"main-battery-charging" , + regmap, +LOCOMO_LPT0 );if (ret <0 )return ret; - ret =led_classdev_register (&ldev->dev, &locomo_led1); + ret =locomo_led_register ( + &pdev->dev, + leds +1 , +"locomo:green:mail" , +"mmc0" , + regmap, +LOCOMO_LPT1 );if (ret <0 ) -led_classdev_unregister (&locomo_led0); - -return ret; -} +return ret; -static int locomoled_remove (struct locomo_dev *dev) -{ -led_classdev_unregister (&locomo_led0); -led_classdev_unregister (&locomo_led1);return 0 ; } -static struct locomo_driver locomoled_driver = { - .drv = { - .name ="locomoled" +static struct platform_driver locomoled_driver = { + .driver = { + .name ="locomo-led" }, - .devid =LOCOMO_DEVID_LED , .probe = locomoled_probe, - .remove = locomoled_remove, }; -static int __init locomoled_init (void ) -{ -return locomo_driver_register (&locomoled_driver); -} -module_init (locomoled_init); +module_platform_driver (locomoled_driver);MODULE_AUTHOR ("John Lenz <[email protected]>" );MODULE_DESCRIPTION ("Locomo LED driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:locomo-led" );
Signature · 2 lines
Best Regards, Jacek Anaszewski
PATCH v5 2/17 leds: port locomo leds driver to new locomo core
Quoted 20 lines · Jacek Anaszewski
Quoted 10 lines · Lee Jones
Quoted 8 lines · Dmitry Eremin-Solenikov
2015-06-09 9:57 GMT+03:00 Lee Jones <[email protected]>:
Quoted 7 lines · Dmitry Eremin-Solenikov
Quoted 5 lines
Adapt locomo leds driver to new locomo core setup.
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Acked-by Jacek Anaszewski <[email protected]>Quoted 8 lines
Quoted 4 lines
Quoted 1 line
This is missing Bryan's Ack.
Jacek is listed as a co-maintainer of the LEDS subsystem, so I assumed that his acked-by is enough.
Ah, this is new.
Congratulations Jacek.
Quoted 7 lines
Thanks.
Quoted 1 line
Ignore me then.
I think that it should go via mfd tree, as this patch adds dependency on header
linux/mfd/locomo.h, which is added in one of the preceding patches [1] in this series.
Yep, that's the plan.
Quoted 181 lines
[1] [PATCH v3 01/17] mfd: add new driver for Sharp LoCoMo
Quoted 177 lines
Quoted 176 lines
Quoted 173 lines
Quoted 172 lines
--- drivers/leds/Kconfig | 2 +- drivers/leds/leds-locomo.c | 117 +++++++++++++++++++++++---------------------- 2 files changed, 61 insertions(+), 58 deletions(-)drivers/leds/Kconfig +1
-1@@ -79,7 +79,7 @@ config LEDS_LM3642 config LEDS_LOCOMO tristate "LED Support for Locomo device" depends on LEDS_CLASS - depends on SHARP_LOCOMO + depends on MFD_LOCOMO help This option enables support for the LEDs on Sharp Locomo. Zaurus models SL-5500 and SL-5600.drivers/leds/leds-locomo.c +60
-57@@ -9,89 +9,92 @@*/ #include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> #include <linux/leds.h> +#include <linux/mfd/locomo.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> -#include <mach/hardware.h> -#include <asm/hardware/locomo.h> +struct locomo_led { +struct led_classdev led; +struct regmap *regmap; +unsigned int reg; +};static void locomoled_brightness_set (struct led_classdev *led_cdev, -enum led_brightness value,int offset) -{ -struct locomo_dev *locomo_dev =LOCOMO_DEV (led_cdev->dev->parent); -unsigned long flags; - -local_irq_save (flags); -if (value) -locomo_writel (LOCOMO_LPT_TOFH , locomo_dev->mapbase + offset); -else -locomo_writel (LOCOMO_LPT_TOFL , locomo_dev->mapbase + offset); -local_irq_restore (flags); -} - -static void locomoled_brightness_set0 (struct led_classdev *led_cdev,enum led_brightness value) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT0 ); + struct locomo_led *led = container_of(led_cdev, struct locomo_led, led); + +regmap_write (led->regmap, led->reg, + value ?LOCOMO_LPT_TOFH :LOCOMO_LPT_TOFL ); } -static void locomoled_brightness_set1 (struct led_classdev *led_cdev, -enum led_brightness value) +static int locomo_led_register ( +struct device *dev, +struct locomo_led *led, +const char *name, +const char *trigger, +struct regmap *regmap, +unsigned int reg) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT1 ); + led->led.name = name; + led->led.flags =LED_CORE_SUSPENDRESUME ; + led->led.default_trigger = trigger; + led->led.brightness_set = locomoled_brightness_set; + led->regmap = regmap; + led->reg = reg; + +return devm_led_classdev_register (dev, &led->led); } -static struct led_classdev locomo_led0 = { - .name ="locomo:amber:charge" , - .default_trigger ="main-battery-charging" , - .brightness_set = locomoled_brightness_set0, -}; - -static struct led_classdev locomo_led1 = { - .name ="locomo:green:mail" , - .default_trigger ="nand-disk" , - .brightness_set = locomoled_brightness_set1, -}; - -static int locomoled_probe (struct locomo_dev *ldev) +static int locomoled_probe (struct platform_device *pdev) {int ret; - - ret =led_classdev_register (&ldev->dev, &locomo_led0); +struct locomo_led *leds; +struct regmap *regmap; + + leds =devm_kzalloc (&pdev->dev,2 *sizeof (*leds),GFP_KERNEL ); +if (!leds) +return -ENOMEM ; + + regmap =dev_get_regmap (pdev->dev.parent,NULL ); +if (!regmap) +return -ENODEV ; + + ret =locomo_led_register ( + &pdev->dev, + leds, +"locomo:amber:charge" , +"main-battery-charging" , + regmap, +LOCOMO_LPT0 );if (ret <0 )return ret; - ret =led_classdev_register (&ldev->dev, &locomo_led1); + ret =locomo_led_register ( + &pdev->dev, + leds +1 , +"locomo:green:mail" , +"mmc0" , + regmap, +LOCOMO_LPT1 );if (ret <0 ) -led_classdev_unregister (&locomo_led0); - -return ret; -} +return ret; -static int locomoled_remove (struct locomo_dev *dev) -{ -led_classdev_unregister (&locomo_led0); -led_classdev_unregister (&locomo_led1);return 0 ; } -static struct locomo_driver locomoled_driver = { - .drv = { - .name ="locomoled" +static struct platform_driver locomoled_driver = { + .driver = { + .name ="locomo-led" }, - .devid =LOCOMO_DEVID_LED , .probe = locomoled_probe, - .remove = locomoled_remove, }; -static int __init locomoled_init (void ) -{ -return locomo_driver_register (&locomoled_driver); -} -module_init (locomoled_init); +module_platform_driver (locomoled_driver);MODULE_AUTHOR ("John Lenz <[email protected]>" );MODULE_DESCRIPTION ("Locomo LED driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:locomo-led" );
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v5 2/17 leds: port locomo leds driver to new locomo core
In reply to Dmitry Eremin-SolenikovQuoted 5 lines · Dmitry Eremin-Solenikov
2015-06-09 9:57 GMT+03:00 Lee Jones <[email protected]>:
Quoted 4 lines · Dmitry Eremin-Solenikov
Quoted 3 lines
Adapt locomo leds driver to new locomo core setup.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Acked-by Jacek Anaszewski <[email protected]>This is missing Bryan's Ack.
Jacek is listed as a co-maintainer of the LEDS subsystem, so I assumed that his acked-by is enough.
Yeah, Jacke's Acked-by is good enough.
Thanks,
-Bryan
Quoted 185 lines
Quoted 169 lines
Quoted 169 lines
--- drivers/leds/Kconfig | 2 +- drivers/leds/leds-locomo.c | 117 +++++++++++++++++++++++---------------------- 2 files changed, 61 insertions(+), 58 deletions(-)drivers/leds/Kconfig +1
-1@@ -79,7 +79,7 @@ config LEDS_LM3642 config LEDS_LOCOMO tristate "LED Support for Locomo device" depends on LEDS_CLASS - depends on SHARP_LOCOMO + depends on MFD_LOCOMO help This option enables support for the LEDs on Sharp Locomo. Zaurus models SL-5500 and SL-5600.drivers/leds/leds-locomo.c +59
-57@@ -9,89 +9,92 @@*/ #include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> #include <linux/leds.h> +#include <linux/mfd/locomo.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> -#include <mach/hardware.h> -#include <asm/hardware/locomo.h> +struct locomo_led { +struct led_classdev led; +struct regmap *regmap; +unsigned int reg; +};static void locomoled_brightness_set (struct led_classdev *led_cdev, -enum led_brightness value,int offset) -{ -struct locomo_dev *locomo_dev =LOCOMO_DEV (led_cdev->dev->parent); -unsigned long flags; - -local_irq_save (flags); -if (value) -locomo_writel (LOCOMO_LPT_TOFH , locomo_dev->mapbase + offset); -else -locomo_writel (LOCOMO_LPT_TOFL , locomo_dev->mapbase + offset); -local_irq_restore (flags); -} - -static void locomoled_brightness_set0 (struct led_classdev *led_cdev,enum led_brightness value) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT0 ); + struct locomo_led *led = container_of(led_cdev, struct locomo_led, led); + +regmap_write (led->regmap, led->reg, + value ?LOCOMO_LPT_TOFH :LOCOMO_LPT_TOFL ); } -static void locomoled_brightness_set1 (struct led_classdev *led_cdev, -enum led_brightness value) +static int locomo_led_register ( +struct device *dev, +struct locomo_led *led, +const char *name, +const char *trigger, +struct regmap *regmap, +unsigned int reg) { -locomoled_brightness_set (led_cdev, value,LOCOMO_LPT1 ); + led->led.name = name; + led->led.flags =LED_CORE_SUSPENDRESUME ; + led->led.default_trigger = trigger; + led->led.brightness_set = locomoled_brightness_set; + led->regmap = regmap; + led->reg = reg; + +return devm_led_classdev_register (dev, &led->led); } -static struct led_classdev locomo_led0 = { - .name ="locomo:amber:charge" , - .default_trigger ="main-battery-charging" , - .brightness_set = locomoled_brightness_set0, -}; - -static struct led_classdev locomo_led1 = { - .name ="locomo:green:mail" , - .default_trigger ="nand-disk" , - .brightness_set = locomoled_brightness_set1, -}; - -static int locomoled_probe (struct locomo_dev *ldev) +static int locomoled_probe (struct platform_device *pdev) {int ret; - - ret =led_classdev_register (&ldev->dev, &locomo_led0); +struct locomo_led *leds; +struct regmap *regmap; + + leds =devm_kzalloc (&pdev->dev,2 *sizeof (*leds),GFP_KERNEL ); +if (!leds) +return -ENOMEM ; + + regmap =dev_get_regmap (pdev->dev.parent,NULL ); +if (!regmap) +return -ENODEV ; + + ret =locomo_led_register ( + &pdev->dev, + leds, +"locomo:amber:charge" , +"main-battery-charging" , + regmap, +LOCOMO_LPT0 );if (ret <0 )return ret; - ret =led_classdev_register (&ldev->dev, &locomo_led1); + ret =locomo_led_register ( + &pdev->dev, + leds +1 , +"locomo:green:mail" , +"mmc0" , + regmap, +LOCOMO_LPT1 );if (ret <0 ) -led_classdev_unregister (&locomo_led0); - -return ret; -} +return ret; -static int locomoled_remove (struct locomo_dev *dev) -{ -led_classdev_unregister (&locomo_led0); -led_classdev_unregister (&locomo_led1);return 0 ; } -static struct locomo_driver locomoled_driver = { - .drv = { - .name ="locomoled" +static struct platform_driver locomoled_driver = { + .driver = { + .name ="locomo-led" }, - .devid =LOCOMO_DEVID_LED , .probe = locomoled_probe, - .remove = locomoled_remove, }; -static int __init locomoled_init (void ) -{ -return locomo_driver_register (&locomoled_driver); -} -module_init (locomoled_init); +module_platform_driver (locomoled_driver);Quoted 10 lines
drivers/leds/leds-locomo.c line 100
Quoted 4 lines
drivers/leds/leds-locomo.c +1
-0MODULE_AUTHOR ("John Lenz <[email protected]>" );MODULE_DESCRIPTION ("Locomo LED driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:locomo-led" );--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog--
With best wishes
Dmitry
PATCH v5 3/17 input: convert LoCoMo keyboard driver to use new locomo core
In reply to Dmitry Eremin-SolenikovAs LoCoMo is switching to new device model, adapt keyboard driver to support new locomo core driver.
--- drivers/input/keyboard/Kconfig | 2 +- drivers/input/keyboard/locomokbd.c | 252 ++++++++++++++++++------------------- 2 files changed, 121 insertions(+), 133 deletions(-)
drivers/input/keyboard/Kconfig +1 -1
@@ -337,7 +337,7 @@ config KEYBOARD_LM8333 config KEYBOARD_LOCOMO tristate "LoCoMo Keyboard Support" - depends on SHARP_LOCOMO + depends on MFD_LOCOMO help Say Y here if you are running Linux on a Sharp Zaurus Collie or Poodle based PDA
drivers/input/keyboard/locomokbd.c +120 -132
407 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v5 4/17 input: locomokbd: differentiate between two Enter keys
In reply to Dmitry Eremin-SolenikovThere are two Enter keys on collie/poodle keyboards. Make one of them to generate KEY_KPENTER rather than just KEY_ENTER.
--- drivers/input/keyboard/locomokbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/locomokbd.c +1 -1
@@ -50,7 +50,7 @@ locomokbd_keycode[LOCOMOKBD_NUMKEYS] = {0 ,0 ,0 ,KEY_CENTER ,0 ,KEY_MAIL ,0 ,0 ,0 ,0 ,/* 30 - 39 */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,KEY_RIGHT ,/* 40 - 49 */ KEY_UP ,KEY_LEFT ,0 ,0 ,KEY_P ,0 ,KEY_O ,KEY_I ,KEY_Y ,KEY_T ,/* 50 - 59 */ -KEY_E ,KEY_W ,0 ,0 ,0 ,0 ,KEY_DOWN ,KEY_ENTER ,0 ,0 ,/* 60 - 69 */ +KEY_E ,KEY_W ,0 ,0 ,0 ,0 ,KEY_DOWN ,KEY_KPENTER ,0 ,0 ,/* 60 - 69 */ KEY_BACKSPACE ,0 ,KEY_L ,KEY_U ,KEY_H ,KEY_R ,KEY_D ,KEY_Q ,0 ,0 ,/* 70 - 79 */ 0 ,0 ,0 ,0 ,0 ,0 ,KEY_ENTER ,KEY_RIGHTSHIFT ,KEY_K ,KEY_J ,/* 80 - 89 */ KEY_G, KEY_F, KEY_X, KEY_S, 0, 0, 0, 0, 0, 0, /* 90 - 99 */
Signature · 1 line
2.1.4
PATCH v5 5/17 input: make LoCoMo keyboard driver support both poodle and collie
In reply to Dmitry Eremin-SolenikovKeyboards on collie and poodle differ only in wiring of 'Home' key. Instead of complicating the driver with platform data, just check for the machine for the time being. This will be converted to DTS property sometime in the future.
--- drivers/input/keyboard/locomokbd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/input/keyboard/locomokbd.c +9 -1
@@ -33,6 +33,9 @@#include <linux/slab.h> #include <linux/mfd/locomo.h> +/* There is one minor difference between mappings on poodle and collie */ +#include <asm/mach-types.h> +#define KEY_ACTIVITY KEY_F16#define KEY_CONTACT KEY_F18#define KEY_CENTER KEY_F15
@@ -45,7 +48,7 @@static const unsigned char locomokbd_keycode[LOCOMOKBD_NUMKEYS ] = {0 ,KEY_ESC ,KEY_ACTIVITY ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 0 - 9 */ -0 ,0 ,0 ,0 ,0 ,0 ,0 ,KEY_MENU ,KEY_HOME ,KEY_CONTACT ,/* 10 - 19 */ +0 ,0 ,0 ,0 ,0 ,0 ,0 ,KEY_MENU ,0 ,KEY_CONTACT ,/* 10 - 19 */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 20 - 29 */ 0 ,0 ,0 ,KEY_CENTER ,0 ,KEY_MAIL ,0 ,0 ,0 ,0 ,/* 30 - 39 */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,KEY_RIGHT ,/* 40 - 49 */
@@ -278,6 +281,11 @@ static int locomokbd_probe(struct platform_device *dev) locomokbd_keycode, sizeof(locomokbd->keycode)); +if (machine_is_collie ()) + locomokbd->keycode[18 ] =KEY_HOME ; +else + locomokbd->keycode[3 ] =KEY_HOME ; +for (i =0 ; i <LOCOMOKBD_NUMKEYS ; i++)input_set_capability (input_dev,EV_KEY , locomokbd->keycode[i]);input_set_capability (input_dev,EV_PWR ,KEY_SUSPEND );
Signature · 1 line
2.1.4
PATCH v5 5/17 input: make LoCoMo keyboard driver support both poodle and collie
drivers/input/keyboard/locomokbd.c static int locomokbd_probe(struct platform_device *dev) · line 287
Quoted 8 lines · Dmitry Eremin-Solenikov
drivers/input/keyboard/locomokbd.c +4
-0@@ -278,6 +281,11 @@ static int locomokbd_probe(struct platform_device *dev) locomokbd_keycode, sizeof(locomokbd->keycode)); +if (machine_is_collie ()) + locomokbd->keycode[18 ] =KEY_HOME ; +else + locomokbd->keycode[3 ] =KEY_HOME ;
We had decided that we weren't allowing any new machine_is_xxx() in drivers. Why can't this difference be encoded via platform data, so it can be later encoded in DT if sa11x0 moves in that direction?
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH v5 5/17 input: make LoCoMo keyboard driver support both poodle and collie
Hello,
2015-06-14 18:11 GMT+03:00 Russell King - ARM Linux <[email protected]>:
Quoted 5 lines · Dmitry Eremin-Solenikov
Quoted 4 lines
drivers/input/keyboard/locomokbd.c +0
-0@@ -278,6 +281,11 @@ static int locomokbd_probe(struct platform_device *dev) locomokbd_keycode, sizeof(locomokbd->keycode));
Quoted 8 lines
drivers/input/keyboard/locomokbd.c static int locomokbd_probe(struct platform_device *dev) · line 287
Quoted 4 lines
drivers/input/keyboard/locomokbd.c +4
-0+if (machine_is_collie ()) + locomokbd->keycode[18 ] =KEY_HOME ; +else + locomokbd->keycode[3 ] =KEY_HOME ;We had decided that we weren't allowing any new
machine_is_xxx()in drivers. Why can't this difference be encoded via platform data, so it can be later encoded in DT if sa11x0 moves in that direction?
I'd agree with you. However this looks rather long path:
* Introduce platform data with just one preference (for home key).
* Switch poodle(pxa) to dts
* Switch collie(sa1100) to dts
* Introduce special property (or use compatibility string)
* Kill platform data.
By allowing machine_is_xx() here we can forget about this temporary platform data. The change is quite isolated. If you completely disagree with this patch, I'd prefer to just drop it for now (as it is an added feature rather than just refactoring).
Signature · 2 lines
With best wishes Dmitry
PATCH v5 6/17 video: backlight: add new locomo backlight driver
In reply to Dmitry Eremin-SolenikovAdd new simple backlight driver - it cares only about PWM/frontlight part of LoCoMo, it does not touch TFT settings and does not export TFT power control.
--- drivers/video/backlight/Kconfig | 6 +- drivers/video/backlight/Makefile | 2 +- drivers/video/backlight/locomo_bl.c | 153 ++++++++++++++++++++++++++++++++++++ 3 files changed, 157 insertions(+), 4 deletions(-) create mode 100644 drivers/video/backlight/locomo_bl.c
drivers/video/backlight/Kconfig +3 -3
@@ -217,12 +217,12 @@ config BACKLIGHT_LM3533 levels. config BACKLIGHT_LOCOMO - tristate "Sharp LOCOMO LCD/Backlight Driver" - depends on SHARP_LOCOMO + tristate "Sharp LOCOMO Backlight Driver" + depends on MFD_LOCOMO default y help If you have a Sharp Zaurus SL-5500 (Collie) or SL-5600 (Poodle) say y to - enable the LCD/backlight driver. + enable the backlight driver. config BACKLIGHT_OMAP1 tristate "OMAP1 PWL-based LCD Backlight"
drivers/video/backlight/Makefile +1 -1
@@ -39,7 +39,7 @@ obj-$(CONFIG_BACKLIGHT_IPAQ_MICRO) += ipaq_micro_bl.o obj-$(CONFIG_BACKLIGHT_LM3533) += lm3533_bl.o obj-$(CONFIG_BACKLIGHT_LM3630A) += lm3630a_bl.o obj-$(CONFIG_BACKLIGHT_LM3639) += lm3639_bl.o -obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o +obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomo_bl.o obj-$(CONFIG_BACKLIGHT_LP855X) += lp855x_bl.o obj-$(CONFIG_BACKLIGHT_LP8788) += lp8788_bl.o obj-$(CONFIG_BACKLIGHT_LV5207LP) += lv5207lp.o
drivers/video/backlight/locomo_bl.c new file +153 -0
153 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v5 6/17 video: backlight: add new locomo backlight driver
Quoted 3 lines · Dmitry Eremin-Solenikov
Add new simple backlight driver - it cares only about PWM/frontlight part of LoCoMo, it does not touch TFT settings and does not export TFT power control.
Is there a reason not to model the PWM as a PWM device, and use pwm_bl.c ? pwm_bl.c can be used in non-DT setups too.
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH v5 6/17 video: backlight: add new locomo backlight driver
Hello,
2015-06-14 18:13 GMT+03:00 Russell King - ARM Linux <[email protected]>:
Quoted 7 lines · Dmitry Eremin-Solenikov
Quoted 3 lines
Add new simple backlight driver - it cares only about PWM/frontlight part of LoCoMo, it does not touch TFT settings and does not export TFT power control.
Is there a reason not to model the PWM as a PWM device, and use
pwm_bl.c?pwm_bl.ccan be used in non-DT setups too.
I thought about it too. The problem is the FLVR pin, which adds another (extra) brighness level after the PWM is configured to 100% duty cycle.
Whether to use PWM subsystem or not for handling this PWM is an open question. I decided not to use it (at least for now), because that would bring complexity with no directly added value.
Signature · 2 lines
With best wishes Dmitry
PATCH v5 7/17 video: lcd: add LoCoMo LCD driver
In reply to Dmitry Eremin-SolenikovLoCoMo has some special handling for TFT screens attached to Collie and Poodle. Implement that as a separate driver.
--- drivers/video/backlight/Kconfig | 10 ++ drivers/video/backlight/Makefile | 1 + drivers/video/backlight/locomo_lcd.c | 285 +++++++++++++++++++++++++++++++++++ 3 files changed, 296 insertions(+) create mode 100644 drivers/video/backlight/locomo_lcd.c
drivers/video/backlight/Kconfig +10 -0
@@ -48,6 +48,16 @@ config LCD_LMS283GF05 SPI driver for Samsung LMS283GF05. This provides basic support for powering the LCD up/down through a sysfs interface. +config LCD_LOCOMO + tristate "Sharp LOCOMO LCD Driver" + depends on MFD_LOCOMO + select IIO + help + If you have a Sharp Zaurus SL-5500 (Collie) or SL-5600 (Poodle) say y to + enable the LCD driver. The panel starts up in power + off state, so you need this driver in order to see any + output. + config LCD_LTV350QV tristate "Samsung LTV350QV LCD Panel" depends on SPI_MASTER
drivers/video/backlight/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_LCD_L4F00242T03) += l4f00242t03.o obj-$(CONFIG_LCD_LD9040) += ld9040.o obj-$(CONFIG_LCD_LMS283GF05) += lms283gf05.o obj-$(CONFIG_LCD_LMS501KF03) += lms501kf03.o +obj-$(CONFIG_LCD_LOCOMO) += locomo_lcd.o obj-$(CONFIG_LCD_LTV350QV) += ltv350qv.o obj-$(CONFIG_LCD_PLATFORM) += platform_lcd.o obj-$(CONFIG_LCD_S6E63M0) += s6e63m0.o
drivers/video/backlight/locomo_lcd.c new file +285 -0
285 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v5 7/17 video: lcd: add LoCoMo LCD driver
drivers/video/backlight/locomo_lcd.c line 126
Quoted 11 lines · Dmitry Eremin-Solenikov
drivers/video/backlight/locomo_lcd.c new file +11
-0+int locomo_lcd_set_power (struct lcd_device *ldev,int power) +{ +struct locomo_lcd *lcd =lcd_get_data (ldev); + +dev_dbg (&ldev->dev,"LCD power %d (is %d)\n" , power, lcd->power); + +if (!power && lcd->power) +locomo_lcd_on (lcd); + +if (power && !lcd->power) +locomo_lcd_off (lcd);
Is this correct? You want to turn the LCD _off_ if power is non-zero, but turn it _on_ if power is _zero_ ?
Just wondering if this would be clearer:
if (!power != !lcd->power) {
/* Power state is different */
if (!power)
locomo_lcd_on(lcd);
else
locomo_lcd_off(lcd);
lcd->power = power;
}At least less prone to getting the power state wrong...
drivers/video/backlight/locomo_lcd.c line 250
Quoted 6 lines
drivers/video/backlight/locomo_lcd.c new file +6
-0+static int locomo_lcd_remove (struct platform_device *dev) +{ +struct lcd_device *ldev =platform_get_drvdata (dev); +struct locomo_lcd *lcd =lcd_get_data (ldev); + +locomo_lcd_off (lcd);
You're careful above not to turn the LCD off if it's already off, but here that doesn't matter? What if the LCD is already off? Does this need protection against double-off?
Quoted 4 lines
drivers/video/backlight/locomo_lcd.c new file +4
-0+ +locomo_lcd_disable_adsync (lcd); + +iio_channel_release (lcd->comadj);
drivers/video/backlight/locomo_lcd.c line 264
Quoted 10 lines
drivers/video/backlight/locomo_lcd.c new file +10
-0+ +return 0 ; +} + +static void locomo_lcd_shutdown (struct platform_device *dev) +{ +struct lcd_device *ldev =platform_get_drvdata (dev); +struct locomo_lcd *lcd =lcd_get_data (ldev); + +locomo_lcd_off (lcd);
Ditto.
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH v5 7/17 video: lcd: add LoCoMo LCD driver
2015-06-14 18:18 GMT+03:00 Russell King - ARM Linux <[email protected]>:
Quoted 7 lines · Dmitry Eremin-Solenikov
Quoted 6 lines
drivers/video/backlight/locomo_lcd.c new file +6
-0+int locomo_lcd_set_power (struct lcd_device *ldev,int power) +{ +struct locomo_lcd *lcd =lcd_get_data (ldev); + +dev_dbg (&ldev->dev,"LCD power %d (is %d)\n" , power, lcd->power); +
Quoted 8 lines
drivers/video/backlight/locomo_lcd.c line 126
Quoted 5 lines
drivers/video/backlight/locomo_lcd.c new file +5
-0+if (!power && lcd->power) +locomo_lcd_on (lcd); + +if (power && !lcd->power) +locomo_lcd_off (lcd);Is this correct? You want to turn the LCD _off_ if power is non-zero, but turn it _on_ if power is _zero_ ?
Yes, this is a crazy part of fb/backlight/LCD, where power is a FB_BLANK_* value, and FB_BLANK_UNBLANK is equal to 0.
Signature · 2 lines
With best wishes Dmitry
PATCH v5 7/17 video: lcd: add LoCoMo LCD driver
Quoted 17 lines · Dmitry Eremin-Solenikov
2015-06-14 18:18 GMT+03:00 Russell King - ARM Linux <[email protected]>:
Quoted 7 lines · Dmitry Eremin-Solenikov
Quoted 6 lines
drivers/video/backlight/locomo_lcd.c new file +6
-0+int locomo_lcd_set_power (struct lcd_device *ldev,int power) +{ +struct locomo_lcd *lcd =lcd_get_data (ldev); + +dev_dbg (&ldev->dev,"LCD power %d (is %d)\n" , power, lcd->power); +Quoted 8 lines
drivers/video/backlight/locomo_lcd.c line 126
Quoted 5 lines
drivers/video/backlight/locomo_lcd.c new file +5
-0+if (!power && lcd->power) +locomo_lcd_on (lcd); + +if (power && !lcd->power) +locomo_lcd_off (lcd);Is this correct? You want to turn the LCD _off_ if power is non-zero, but turn it _on_ if power is _zero_ ?
Quoted 2 lines
Yes, this is a crazy part of fb/backlight/LCD, where power is a FB_BLANK_* value, and
FB_BLANK_UNBLANKis equal to 0.
In which case, the code is probably wrong anyway. This would make it much clearer:
bool power_on = power == FB_BLANK_UNBLANK;
if (power_on != lcd->power_is_on) {
if (power_on)
locomo_lcd_on(lcd);
else
locomo_lcd_off(lcd);
lcd->power_is_on = power_on;
}with lcd->power_is_on also being a bool. The above is almost English...
if the power state is different from last time, then
if we want power on
call locomo_lcd_on
otherwise
call locomo_lcd_off
remember power state
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH v5 8/17 gpio: port LoCoMo gpio support from old driver
In reply to Dmitry Eremin-SolenikovAdd gpiolib driver for gpio pins placed on the LoCoMo GA.
--- drivers/gpio/Kconfig | 12 ++++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-locomo.c | 170 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+) create mode 100644 drivers/gpio/gpio-locomo.c
drivers/gpio/Kconfig +12 -0
@@ -734,6 +734,18 @@ config GPIO_KEMPLD This driver can also be built as a module. If so, the module will be called gpio-kempld. +config GPIO_LOCOMO + bool "Sharp LoCoMo GPIO support" + depends on MFD_LOCOMO + help + Select this to support GPIO pins on Sharp LoCoMo Grid Array found + in Sharp Zaurus collie and poodle models. + + Sat Yes if you have such PDA, say No otherwise. + + This driver can also be built as a module. If so, the module will be + called gpio-locomo. + config GPIO_LP3943 tristate "TI/National Semiconductor LP3943 GPIO expander" depends on MFD_LP3943
drivers/gpio/Makefile +1 -0
@@ -42,6 +42,7 @@ obj-$(CONFIG_GPIO_JANZ_TTL) += gpio-janz-ttl.o obj-$(CONFIG_GPIO_KEMPLD) += gpio-kempld.o obj-$(CONFIG_ARCH_KS8695) += gpio-ks8695.o obj-$(CONFIG_GPIO_INTEL_MID) += gpio-intel-mid.o +obj-$(CONFIG_GPIO_LOCOMO) += gpio-locomo.o obj-$(CONFIG_GPIO_LOONGSON) += gpio-loongson.o obj-$(CONFIG_GPIO_LP3943) += gpio-lp3943.o obj-$(CONFIG_ARCH_LPC32XX) += gpio-lpc32xx.o
drivers/gpio/gpio-locomo.c new file +170 -0
170 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v5 8/17 gpio: port LoCoMo gpio support from old driver
Quoted 52 lines · Dmitry Eremin-Solenikov
drivers/gpio/Makefile +1
-0@@ -42,6 +42,7 @@ obj-$(CONFIG_GPIO_JANZ_TTL) += gpio-janz-ttl.o obj-$(CONFIG_GPIO_KEMPLD) += gpio-kempld.o obj-$(CONFIG_ARCH_KS8695) += gpio-ks8695.o obj-$(CONFIG_GPIO_INTEL_MID) += gpio-intel-mid.o +obj-$(CONFIG_GPIO_LOCOMO) += gpio-locomo.o obj-$(CONFIG_GPIO_LOONGSON) += gpio-loongson.o obj-$(CONFIG_GPIO_LP3943) += gpio-lp3943.o obj-$(CONFIG_ARCH_LPC32XX) += gpio-lpc32xx.odrivers/gpio/gpio-locomo.c new file +34
-0@@ -0,0 +1,170 @@ +/* +* Sharp LoCoMo support for GPIO +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This file contains all generic LoCoMo support. +* +* All initialization functions provided here are intended to be called +* from machine specific code with proper arguments when required. +*/ +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/slab.h> +#include <linux/bitops.h> +#include <linux/err.h> +#include <linux/gpio.h> +#include <linux/io.h> +#include <linux/regmap.h> +#include <linux/mfd/locomo.h> + +struct locomo_gpio { +struct regmap *regmap; + +struct gpio_chip gpio; + +u16 rising_edge; +u16 falling_edge; + +unsigned int save_gpo; +unsigned int save_gpe; +};
drivers/gpio/gpio-locomo.c line 44
Quoted 10 lines
drivers/gpio/gpio-locomo.c new file +10
-0+ +static int locomo_gpio_get (struct gpio_chip *chip, +unsigned offset) +{ + struct locomo_gpio *lg = container_of(chip, struct locomo_gpio, gpio); +unsigned int gpl; + +regmap_read (lg->regmap,LOCOMO_GPL , &gpl); + +return gpl &BIT (offset);
Aren't gpio_get() functions supposed to return a 0/1 status, not a 0/BIT(n) status?
drivers/gpio/gpio-locomo.c line 90
Quoted 9 lines
drivers/gpio/gpio-locomo.c new file +9
-0+#ifdef CONFIG_PM_SLEEP +static int locomo_gpio_suspend (struct device *dev) +{ +struct locomo_gpio *lg =dev_get_drvdata (dev); + +regmap_read (lg->regmap,LOCOMO_GPO , &lg->save_gpo); +regmap_write (lg->regmap,LOCOMO_GPO ,0x00 ); +regmap_read (lg->regmap,LOCOMO_GPE , &lg->save_gpe); +regmap_write (lg->regmap,LOCOMO_GPE ,0x00 );
Are you sure this is correct? If there are any output signals which are pulled up, this will make them glitch as you seem to first write zero to the output register (which will pull anything that is configured as an output low), and then program all lines as inputs. I haven't checked what the existing code does though...
Quoted 11 lines
drivers/gpio/gpio-locomo.c new file +11
-0+static int locomo_gpio_probe (struct platform_device *pdev) +{ +struct locomo_gpio *lg; +int ret; +struct locomo_gpio_platform_data *pdata =dev_get_platdata (&pdev->dev); + + lg =devm_kzalloc (&pdev->dev,sizeof (struct locomo_gpio ), +GFP_KERNEL ); +if (!lg) +return -ENOMEM ; +
drivers/gpio/gpio-locomo.c line 131
Quoted 10 lines
drivers/gpio/gpio-locomo.c new file +10
-0+ lg->regmap =dev_get_regmap (pdev->dev.parent,NULL ); +if (!lg->regmap) +return -EINVAL ; + +platform_set_drvdata (pdev, lg); + +regmap_write (lg->regmap,LOCOMO_GPO ,0x00 ); +regmap_write (lg->regmap,LOCOMO_GPE ,0x00 ); +regmap_write (lg->regmap,LOCOMO_GPD ,0x00 ); +regmap_write (lg->regmap,LOCOMO_GIE ,0x00 );
Do we really want to initialise all outputs like this? It suffers from the problem I mention above - it sets all outputs to zero, then sets them as inputs, which can lead to glitching. What if (eg) the LCD was left enabled? This would mean you're not going through the proper power-down sequence for the LCD (for example).
TBH, I think GPIO needs to have a way to claim output GPIOs _without_ programming their current state for situations like this. That seems to have been an oversight in the model for a while now - it's impossible to claim GPIO outputs without setting their initial value, and it may be important in case you don't know whether the attached LCD is enabled or disabled, and the attached LCD may require a specific sequence of power removal manipulated by GPIOs. I think this is something for the GPIO people to think about rather than you though...
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH v5 8/17 gpio: port LoCoMo gpio support from old driver
Quoted 7 lines · Russell King - ARM Linux
[Dmitry]
drivers/gpio/gpio-locomo.c line 131
Quoted 4 lines
drivers/gpio/gpio-locomo.c new file +4
-0+regmap_write (lg->regmap,LOCOMO_GPO ,0x00 ); +regmap_write (lg->regmap,LOCOMO_GPE ,0x00 ); +regmap_write (lg->regmap,LOCOMO_GPD ,0x00 ); +regmap_write (lg->regmap,LOCOMO_GIE ,0x00 );
Quoted 5 lines
Do we really want to initialise all outputs like this? It suffers from the problem I mention above - it sets all outputs to zero, then sets them as inputs, which can lead to glitching. What if (eg) the LCD was left enabled? This would mean you're not going through the proper power-down sequence for the LCD (for example).
This looks dangerous indeed, why did I miss that before.
Is it possible to just leave these registers as-is, or, in case you want to know at all times their actual states, implement the .get_direction() callback? They the kernel can explore the direction and value of the lines.
Quoted 4 lines
TBH, I think GPIO needs to have a way to claim output GPIOs _without_ programming their current state for situations like this. That seems to have been an oversight in the model for a while now - it's impossible to claim GPIO outputs without setting their initial value,
It is possible in the new descriptor API, you can claim a GPIO for a device with (see <linux/gpio/consumer.h>
enum gpiod_flags {
GPIOD_ASIS = 0,
(...)
I understand it may be a bit thick to ask to migrate the whole SA1100 codebase to GPIO descriptors though, I don't know how many machines and drivers that would affect.
I'd consider a patch retrofitting this into the old API if it would see some real use case.
Yours,
Linus Walleij
PATCH v5 9/17 gpio: locomo: implement per-pin irq handling
In reply to Dmitry Eremin-SolenikovLoCoMo has a possibility to generate per-GPIO edge irqs. Support for that was there in old locomo driver, got 'cleaned up' during old driver IRQ cascading cleanup and is now reimplemented. It is expected that SL-5500 (collie) will use locomo gpio irqs for mmc detection irq.
--- drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-locomo.c | 117 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 117 insertions(+), 1 deletion(-)
drivers/gpio/Kconfig +1 -0
@@ -737,6 +737,7 @@ config GPIO_KEMPLD config GPIO_LOCOMO bool "Sharp LoCoMo GPIO support" depends on MFD_LOCOMO + select GPIOLIB_IRQCHIP help Select this to support GPIO pins on Sharp LoCoMo Grid Array found in Sharp Zaurus collie and poodle models.
drivers/gpio/gpio-locomo.c +116 -1
154 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v5 10/17 i2c: add locomo i2c driver
In reply to Dmitry Eremin-SolenikovLoCoMo chip contains a tiny i2c controller destined to control M62332 DAC. Provide a separate I2C driver for this cell.
--- drivers/i2c/busses/Kconfig | 12 ++++ drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-locomo.c | 135 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 drivers/i2c/busses/i2c-locomo.c
drivers/i2c/busses/Kconfig +12 -0
@@ -602,6 +602,18 @@ config I2C_KEMPLD This driver can also be built as a module. If so, the module will be called i2c-kempld. +config I2C_LOCOMO + tristate "I2C bus support for LoCoMo chips" + depends on MFD_LOCOMO + select I2C_ALGOBIT + help + Say yes if you will run the kernel on Sharp SL-5x00 family of devices. + + If you don't know what to do here, say N. + + This driver can also be built as a module. If so, the module + will be called i2c-locomo. + config I2C_MESON tristate "Amlogic Meson I2C controller" depends on ARCH_MESON
drivers/i2c/busses/Makefile +1 -0
@@ -58,6 +58,7 @@ obj-$(CONFIG_I2C_IMX) += i2c-imx.o obj-$(CONFIG_I2C_IOP3XX) += i2c-iop3xx.o obj-$(CONFIG_I2C_JZ4780) += i2c-jz4780.o obj-$(CONFIG_I2C_KEMPLD) += i2c-kempld.o +obj-$(CONFIG_I2C_LOCOMO) += i2c-locomo.o obj-$(CONFIG_I2C_MESON) += i2c-meson.o obj-$(CONFIG_I2C_MPC) += i2c-mpc.o obj-$(CONFIG_I2C_MV64XXX) += i2c-mv64xxx.o
drivers/i2c/busses/i2c-locomo.c new file +135 -0
135 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v5 11/17 ARM: sa1100: make collie use new locomo drivers
In reply to Dmitry Eremin-SolenikovSwitch collie to new mfd-based locomo driver. Update platform data and add necessary spi, i2c and regulator devices.
--- arch/arm/mach-sa1100/Kconfig | 1 - arch/arm/mach-sa1100/collie.c | 213 ++++++++++++++++++++++------- arch/arm/mach-sa1100/include/mach/collie.h | 16 ++- 3 files changed, 178 insertions(+), 52 deletions(-)
arch/arm/mach-sa1100/Kconfig +0 -1
@@ -48,7 +48,6 @@ endchoice config SA1100_COLLIE bool "Sharp Zaurus SL5500" # FIXME: select ARM_SA11x0_CPUFREQ - select SHARP_LOCOMO select SHARP_PARAM select SHARP_SCOOP help
arch/arm/mach-sa1100/collie.c +165 -48
312 lines not on this page · raw message
arch/arm/mach-sa1100/include/mach/collie.h +13 -3
@@ -24,12 +24,12 @@ extern void locomolcd_power(int on);#define COLLIE_SCP_MUTE_L SCOOP_GPCR_PA14#define COLLIE_SCP_MUTE_R SCOOP_GPCR_PA15#define COLLIE_SCP_5VON SCOOP_GPCR_PA16 -#define COLLIE_SCP_AMP_ON SCOOP_GPCR_PA17 +#define COLLIE_GPIO_AMP2_ON (COLLIE_SCOOP_GPIO_BASE + 6)#define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7)#define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19#define COLLIE_SCOOP_IO_DIR (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ - COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \ + COLLIE_SCP_5VON | \ COLLIE_SCP_LB_VOL_CHG)#define COLLIE_SCOOP_IO_OUT (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R)
@@ -81,7 +81,7 @@ extern void locomolcd_power(int on);#define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1#define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2#define COLLIE_GPIO_IR_ON (COLLIE_TC35143_GPIO_BASE + 3) -#define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 +#define COLLIE_GPIO_AMP1_ON (COLLIE_TC35143_GPIO_BASE + 4)#define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5#define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5#define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6
@@ -92,4 +92,14 @@ extern void locomolcd_power(int on);#define COLLIE_TC35143_GPIO_OUT (UCB_IO_1 | UCB_IO_3 | UCB_IO_4 \ | UCB_IO_6) +/* GPIOs on LoCoMo GA */ +#define COLLIE_LOCOMO_GPIO_BASE (GPIO_MAX + 13 + 10) +#define COLLIE_GPIO_RTS (COLLIE_LOCOMO_GPIO_BASE + 0) +#define COLLIE_GPIO_CTS (COLLIE_LOCOMO_GPIO_BASE + 1) +#define COLLIE_GPIO_DSR (COLLIE_LOCOMO_GPIO_BASE + 2) +#define COLLIE_GPIO_DTR (COLLIE_LOCOMO_GPIO_BASE + 3) +#define COLLIE_GPIO_CARD_DETECT (COLLIE_LOCOMO_GPIO_BASE + 13) +#define COLLIE_GPIO_CARD_RO (COLLIE_LOCOMO_GPIO_BASE + 14) +#define COLLIE_GPIO_CARD_POWER (COLLIE_LOCOMO_GPIO_BASE + 15) +#endif
Signature · 1 line
2.1.4
PATCH v5 11/17 ARM: sa1100: make collie use new locomo drivers
arch/arm/mach-sa1100/collie.c static struct platform_device collie_power_device = { · line 169
Quoted 6 lines · Dmitry Eremin-Solenikov
arch/arm/mach-sa1100/collie.c +6
-0+static struct gpio collie_uart_gpio[] = { + {COLLIE_GPIO_CTS ,GPIOF_IN ,"CTS" }, + {COLLIE_GPIO_RTS ,GPIOF_OUT_INIT_LOW ,"RTS" }, + {COLLIE_GPIO_DTR ,GPIOF_OUT_INIT_LOW ,"DTR" }, + {COLLIE_GPIO_DSR ,GPIOF_IN ,"DSR" }, +};
These should probably be given a better name rather than just "CTS" - maybe something that gives a clue as to what UART they refer to?
Quoted 11 lines
static void
collie_uart_set_mctrl(struct uart_port *port, u_int mctrl){arch/arm/mach-sa1100/collie.c +0
-9-if (mctrl &TIOCM_RTS ) -locomo_gpio_write (&collie_locomo_device.dev,LOCOMO_GPIO_RTS ,0 ); -else -locomo_gpio_write (&collie_locomo_device.dev,LOCOMO_GPIO_RTS ,1 ); - -if (mctrl &TIOCM_DTR ) -locomo_gpio_write (&collie_locomo_device.dev,LOCOMO_GPIO_DTR ,0 ); -else -locomo_gpio_write (&collie_locomo_device.dev,LOCOMO_GPIO_DTR ,1 );
arch/arm/mach-sa1100/collie.c static struct platform_device collie_power_device = { · line 184
Quoted 10 lines
arch/arm/mach-sa1100/collie.c +10
-0+if (!collie_uart_gpio_ok) { +int rc =gpio_request_array (collie_uart_gpio, +ARRAY_SIZE (collie_uart_gpio)); +if (rc) +pr_err ("collie_uart_set_mctrl: gpio request %d\n" , rc); +else + collie_uart_gpio_ok = true; + } + +if (collie_uart_gpio_ok) {
This seems to be a repeated chunk of code. Maybe:
static bool collie_mctrl_present(void)
{
static bool collie_uart_mctrl_claimed;
if (!collie_uart_mctrl_claimed) {
int rc = gpio_request_array(collie_uart_gpio,
ARRAY_SIZE(collie_uart_gpio));
if (rc)
pr_err("%s: gpio_request_array() failed: %d\n",
__func__, rc);
else
collie_uart_mctrl_claimed = true;
}
return collie_uart_mctrl_claimed;
}static void collie_uart_set_mctrl(struct uart_port *port, u_int mctrl)
{
if (collie_mctrl_present()) {Quoted 22 lines
arch/arm/mach-sa1100/collie.c +13
-3+gpio_set_value (COLLIE_GPIO_RTS , !(mctrl &TIOCM_RTS )); +gpio_set_value (COLLIE_GPIO_DTR , !(mctrl &TIOCM_DTR )); + } }static u_int collie_uart_get_mctrl (struct uart_port *port) {int ret =TIOCM_CD ; -unsigned int r; - r =locomo_gpio_read_output (&collie_locomo_device.dev,LOCOMO_GPIO_CTS &LOCOMO_GPIO_DSR ); -if (r == -ENODEV ) +if (!collie_uart_gpio_ok) { +int rc =gpio_request_array (collie_uart_gpio, +ARRAY_SIZE (collie_uart_gpio)); +if (rc) +pr_err ("collie_uart_get_mctrl: gpio request %d\n" , rc); +else + collie_uart_gpio_ok = true; + } + +if (!collie_uart_gpio_ok)
arch/arm/mach-sa1100/collie.c static struct platform_device collie_power_device = { · line 211
Quoted 10 lines
arch/arm/mach-sa1100/collie.c +3
-2return ret; -if (r &LOCOMO_GPIO_CTS ) + +if (gpio_get_value (COLLIE_GPIO_CTS )) ret |=TIOCM_CTS ; -if (r &LOCOMO_GPIO_DSR ) +if (gpio_get_value (COLLIE_GPIO_DSR )) ret |=TIOCM_DSR ;return ret;
And this would become:
int TIOCM_CD;
if (collie_mctrl_present()) {
if (gpio_get_value(COLLIE_GPIO_CTS))
ret |= TIOCM_CTS;
if (gpio_get_value(COLLIE_GPIO_DSR))
ret |= TIOCM_DSR;
}
return ret;which kind'a looks neater, and avoids duplicating the GPIO claiming.
Quoted 59 lines
arch/arm/mach-sa1100/collie.c +24
-22@@ -191,33 +216,35 @@ static struct sa1100_port_fns collie_port_fns __initdata = { .get_mctrl = collie_uart_get_mctrl, }; -static int collie_uart_probe (struct locomo_dev *dev) -{ -return 0 ; -} - -static int collie_uart_remove (struct locomo_dev *dev) -{ -return 0 ; -} +static struct regulator_consumer_supply collie_amp_on_consumer_supplies[] = { +REGULATOR_SUPPLY ("VCC" ,"1-004e" ), +}; -static struct locomo_driver collie_uart_driver = { - .drv = { - .name ="collie_uart" , +static struct regulator_init_data collie_amp_on_init_data = { + .constraints = { + .name ="AMP_ON" , + .valid_ops_mask =REGULATOR_CHANGE_STATUS , }, - .devid =LOCOMO_DEVID_UART , - .probe = collie_uart_probe, - .remove = collie_uart_remove, + .consumer_supplies = collie_amp_on_consumer_supplies, + .num_consumer_supplies =ARRAY_SIZE (collie_amp_on_consumer_supplies), }; -static int __init collie_uart_init (void ) -{ -return locomo_driver_register (&collie_uart_driver); -} -device_initcall (collie_uart_init); - -#endif +static struct fixed_voltage_config collie_amp_on_data = { + .supply_name ="amp_on" , + .microvolts =3300000 , + .gpio =COLLIE_GPIO_AMP2_ON , + .startup_delay =5 , + .enable_high =1 , + .init_data = &collie_amp_on_init_data, +}; +static struct platform_device collie_amp_on_device = { + .name ="reg-fixed-voltage" , + .id =-1 , + .dev = { + .platform_data = &collie_amp_on_data, + }, +};static struct resource locomo_resources[] = { [0 ] =DEFINE_RES_MEM (0x40000000 ,SZ_8K ),
arch/arm/mach-sa1100/collie.c static struct resource locomo_resources[] = { · line 256
Quoted 6 lines
arch/arm/mach-sa1100/collie.c +2
-1@@ -225,14 +252,15 @@ static struct resource locomo_resources[] = { };static struct locomo_platform_data locomo_info = { - .irq_base =IRQ_BOARD_START , + .gpio_base =COLLIE_LOCOMO_GPIO_BASE , + .comadj =128 ,
Using spaces for what looks like pointless indentation. Please either align the = signs using tabs, or don't bother at all. As the rest of the file's style is to align the = signs using tabs, please remain consistent with the rest of the file unless you are intending to reformat it - in which case, the reformatting should happen as the very first patch.
arch/arm/mach-sa1100/collie.c static struct resource locomo_resources[] = { · line 263
Quoted 9 lines
arch/arm/mach-sa1100/collie.c +2
-2}; -struct platform_device collie_locomo_device = { +static struct platform_device collie_locomo_device = { .name ="locomo" , .id =0 , .dev = { - .platform_data = &locomo_info, + .platform_data = &locomo_info,
You seem to replace a tab with two spaces here...
Quoted 8 lines
arch/arm/mach-sa1100/collie.c +1
-0}, .num_resources = ARRAY_SIZE(locomo_resources), .resource = locomo_resources,@@ -270,7 +298,55 @@ static struct platform_device collie_gpio_keys_device = { }, }; +static int collie_mmc_init(struct device *dev,
arch/arm/mach-sa1100/collie.c static struct platform_device collie_gpio_keys_device = { · line 311
Quoted 10 lines
arch/arm/mach-sa1100/collie.c +10
-0+ irqreturn_t (*isr)(int, void*), void *mmc) +{ + int ret; + + ret =gpio_request (COLLIE_GPIO_CARD_POWER ,"MMC power" ); +if (!ret) + ret =gpio_direction_output (COLLIE_GPIO_CARD_POWER ,0 ); +if (ret) +gpio_free (COLLIE_GPIO_CARD_POWER ); +return ret;
Why not use gpio_request_one() here? This whole function could be collapsed to just:
return gpio_request_one(COLLIE_GPIO_CARD_POWER, GPIOF_OUT_INIT_LOW, "MMC power");
Quoted 63 lines
arch/arm/mach-sa1100/collie.c +51
-3+} + +static void collie_mmc_exit (struct device *dev,void *mmc) +{ +gpio_free (COLLIE_GPIO_CARD_POWER ); +} + +static void collie_mmc_setpower (struct device *dev,unsigned int mask) +{ +gpio_set_value (COLLIE_GPIO_CARD_POWER , !!mask); +} + +static struct mmc_spi_platform_data collie_mmc_data = { + .init = collie_mmc_init, + .exit = collie_mmc_exit, + .setpower = collie_mmc_setpower, + .detect_delay =200 , + .powerup_msecs =200 , + .ocr_mask =MMC_VDD_32_33 |MMC_VDD_33_34 , + .flags =MMC_SPI_USE_CD_GPIO |MMC_SPI_USE_RO_GPIO , + .cd_gpio =COLLIE_GPIO_CARD_DETECT , + .ro_gpio =COLLIE_GPIO_CARD_RO , + .caps2 =MMC_CAP2_RO_ACTIVE_HIGH , +}; + +static struct spi_board_info collie_spi_board_info[]__initdata = { + { + .modalias ="mmc_spi" , + .platform_data = &collie_mmc_data, + .max_speed_hz =25000000 , + .bus_num =0 , + .chip_select =0 , + .mode =SPI_MODE_0 , + }, +}; +static struct platform_device *devices[]__initdata = { + &collie_amp_on_device, &collie_locomo_device, &colliescoop_device, &collie_power_device,@@ -347,10 +423,39 @@ static struct sa1100fb_mach_info collie_lcd_info = { .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), +}; -#ifdef CONFIG_BACKLIGHT_LOCOMO - .lcd_power = locomolcd_power -#endif +static struct iio_map locomo_iio_map[] = { + { + .consumer_dev_name ="locomo-lcd.0" , + .consumer_channel ="comadj" , + .adc_channel_label ="CH0" , + }, + { } +}; + +static struct i2c_board_info locomo_i2c_devs[]__initdata = { + { +I2C_BOARD_INFO ("m62332" ,0x4e ), + .platform_data = locomo_iio_map,
arch/arm/mach-sa1100/collie.c static struct sa1100fb_mach_info collie_lcd_info = { · line 450
Quoted 10 lines
arch/arm/mach-sa1100/collie.c +10
-0+ }, +}; + +static struct gpiod_lookup_table collie_bl_gpios_table = { + .dev_id ="locomo-backlight.0" , + .table = { +GPIO_LOOKUP ("locomo-gpio" ,9 ,"flvr" ,GPIO_ACTIVE_HIGH ), + { }, + }, +}, collie_lcd_gpios_table = {
Please don't do this. Please phrase this instead as:
};
static struct gpiod_lookup_table collie_lcd_gpios_table = {
Quoted 9 lines
arch/arm/mach-sa1100/collie.c +8
-0+ .dev_id = "locomo-lcd.0", + .table = { +GPIO_LOOKUP ("locomo-gpio" ,4 ,"VSHA" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("locomo-gpio" ,5 ,"VSHD" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("locomo-gpio" ,6 ,"Vee" ,GPIO_ACTIVE_HIGH ), + GPIO_LOOKUP("locomo-gpio", 7, "MOD", GPIO_ACTIVE_HIGH), + { }, + }, };
...
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH v5 12/17 ARM: sa1100: don't preallocate IRQ space for locomo
In reply to Dmitry Eremin-SolenikovAs new locomo driver properly supports SPARSE_IRQ, stop playing with NR_IRQS on sa1100 (locomo was the last chip requiring NR_IRQ tricks).
--- arch/arm/mach-sa1100/include/mach/irqs.h | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-)
arch/arm/mach-sa1100/include/mach/irqs.h +2 -17
@@ -79,22 +79,7 @@#define IRQ_BOARD_START 61#define IRQ_BOARD_END 77 -/* -* Figure out the MAX IRQ number. -* -* Neponset, SA1111 and UCB1x00 are sparse IRQ aware, so can dynamically -* allocate their IRQs above NR_IRQS. -* -* LoCoMo has 4 additional IRQs, but is not sparse IRQ aware, and so has -* to be included in the NR_IRQS calculation. -*/ -#ifdef CONFIG_SHARP_LOCOMO -#define NR_IRQS_LOCOMO 4 -#else -#define NR_IRQS_LOCOMO 0 -#endif -#ifndef NR_IRQS -#define NR_IRQS (IRQ_BOARD_START + NR_IRQS_LOCOMO) +#define NR_IRQS IRQ_BOARD_START#endif -#define SA1100_NR_IRQS (IRQ_BOARD_START + NR_IRQS_LOCOMO) +#define SA1100_NR_IRQS IRQ_BOARD_START
Signature · 1 line
2.1.4
PATCH v5 13/17 ASoC: pxa: poodle: make use of new locomo GPIO interface
In reply to Dmitry Eremin-SolenikovSince LoCoMo driver has been converted to provide proper gpiolib interface, make poodle ASoC platform driver use gpiolib API.
--- sound/soc/pxa/poodle.c | 52 +++++++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-)
sound/soc/pxa/poodle.c +20 -32
@@ -20,15 +20,11 @@#include <linux/i2c.h> #include <linux/interrupt.h> #include <linux/platform_device.h> +#include <linux/gpio/consumer.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/soc.h> -#include <asm/mach-types.h> -#include <asm/hardware/locomo.h> -#include <mach/poodle.h> -#include <mach/audio.h> -#include "../codecs/wm8731.h" #include "pxa2xx-i2s.h"
@@ -42,22 +38,18 @@static int poodle_jack_func;static int poodle_spk_func; +static struct gpio_desc *poodle_mute_l, *poodle_mute_r, *poodle_amp_on;static void poodle_ext_control (struct snd_soc_dapm_context *dapm) {/* set up jack connection */ if (poodle_jack_func ==POODLE_HP ) { -/* set = unmute headphone */ -locomo_gpio_write (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_MUTE_L ,1 ); -locomo_gpio_write (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_MUTE_R ,1 ); +gpiod_set_value (poodle_mute_l,0 ); +gpiod_set_value (poodle_mute_r,0 );snd_soc_dapm_enable_pin (dapm,"Headphone Jack" ); }else { -locomo_gpio_write (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_MUTE_L ,0 ); -locomo_gpio_write (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_MUTE_R ,0 ); +gpiod_set_value (poodle_mute_l,1 ); +gpiod_set_value (poodle_mute_r,1 );snd_soc_dapm_disable_pin (dapm,"Headphone Jack" ); }
@@ -84,11 +76,8 @@ static int poodle_startup(struct snd_pcm_substream *substream)/* we need to unmute the HP at shutdown as the mute burns power on poodle */ static void poodle_shutdown (struct snd_pcm_substream *substream) { -/* set = unmute headphone */ -locomo_gpio_write (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_MUTE_L ,1 ); -locomo_gpio_write (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_MUTE_R ,1 ); +gpiod_set_value (poodle_mute_l,0 ); +gpiod_set_value (poodle_mute_r,0 ); } static int poodle_hw_params(struct snd_pcm_substream *substream,
@@ -178,12 +167,7 @@ static int poodle_set_spk(struct snd_kcontrol *kcontrol,static int poodle_amp_event (struct snd_soc_dapm_widget *w,struct snd_kcontrol *k,int event) { -if (SND_SOC_DAPM_EVENT_ON (event)) -locomo_gpio_write (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_AMP_ON ,0 ); -else -locomo_gpio_write (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_AMP_ON ,1 ); +gpiod_set_value (poodle_amp_on, (SND_SOC_DAPM_EVENT_ON (event)));return 0 ; }
@@ -268,13 +252,17 @@ static int poodle_probe(struct platform_device *pdev)struct snd_soc_card *card = &poodle;int ret; -locomo_gpio_set_dir (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_AMP_ON ,0 ); -/* should we mute HP at startup - burning power ?*/ -locomo_gpio_set_dir (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_MUTE_L ,0 ); -locomo_gpio_set_dir (&poodle_locomo_device.dev, -POODLE_LOCOMO_GPIO_MUTE_R ,0 ); + poodle_mute_l =devm_gpiod_get (&pdev->dev,"mute-l" ,GPIOD_OUT_HIGH ); +if (IS_ERR (poodle_mute_l)) +return PTR_ERR (poodle_mute_l); + + poodle_mute_r =devm_gpiod_get (&pdev->dev,"mute-r" ,GPIOD_OUT_HIGH ); +if (IS_ERR (poodle_mute_r)) +return PTR_ERR (poodle_mute_l); + + poodle_amp_on =devm_gpiod_get (&pdev->dev,"amp-on" ,GPIOD_OUT_LOW ); +if (IS_ERR (poodle_amp_on)) +return PTR_ERR (poodle_amp_on); card->dev = &pdev->dev;
Signature · 1 line
2.1.4
PATCH v5 14/17 ARM: pxa: poodle: use new LoCoMo driver
In reply to Dmitry Eremin-SolenikovConvert poodle to use new mfd-based LoCoMo driver.
--- arch/arm/mach-pxa/Kconfig | 1 - arch/arm/mach-pxa/include/mach/poodle.h | 6 ---- arch/arm/mach-pxa/poodle.c | 58 ++++++++++++++++++++++++++++++--- 3 files changed, 54 insertions(+), 11 deletions(-)
arch/arm/mach-pxa/Kconfig +0 -1
@@ -481,7 +481,6 @@ config MACH_POODLE bool "Enable Sharp SL-5600 (Poodle) Support" depends on PXA_SHARPSL select PXA25x - select SHARP_LOCOMO config MACH_CORGI bool "Enable Sharp SL-C700 (Corgi) Support"
arch/arm/mach-pxa/include/mach/poodle.h +0 -6
@@ -81,12 +81,6 @@#define POODLE_GPIO_L_LCLK (POODLE_SCOOP_GPIO_BASE + 10)#define POODLE_GPIO_HS_OUT (POODLE_SCOOP_GPIO_BASE + 11) -#define POODLE_LOCOMO_GPIO_AMP_ON LOCOMO_GPIO(8) -#define POODLE_LOCOMO_GPIO_MUTE_L LOCOMO_GPIO(10) -#define POODLE_LOCOMO_GPIO_MUTE_R LOCOMO_GPIO(11) -#define POODLE_LOCOMO_GPIO_232VCC_ON LOCOMO_GPIO(12) -#define POODLE_LOCOMO_GPIO_JK_B LOCOMO_GPIO(13) -#define POODLE_NR_IRQS (IRQ_BOARD_START + 4)/* 4 for LoCoMo */ extern struct platform_device poodle_locomo_device;
arch/arm/mach-pxa/poodle.c +54 -4
106 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v5 14/17 ARM: pxa: poodle: use new LoCoMo driver
arch/arm/mach-pxa/poodle.c static struct resource locomo_resources[] = { · line 185
Quoted 7 lines · Dmitry Eremin-Solenikov
arch/arm/mach-pxa/poodle.c +2
-1@@ -179,7 +181,8 @@ static struct resource locomo_resources[] = { };static struct locomo_platform_data locomo_info = { - .irq_base =IRQ_BOARD_START , + .gpio_base =-1 , + .comadj =118 ,
More space vs tabs madness. Please keep to the original file's style when editing, it's important.
Quoted 31 lines
arch/arm/mach-pxa/poodle.c +15
-2};struct platform_device poodle_locomo_device = {@@ -192,8 +195,6 @@ struct platform_device poodle_locomo_device = { }, }; -EXPORT_SYMBOL (poodle_locomo_device); -#if defined(CONFIG_SPI_PXA2XX ) || defined(CONFIG_SPI_PXA2XX_MODULE )static struct pxa2xx_spi_master poodle_spi_info = { .num_chipselect = 1,@@ -424,6 +425,47 @@ static struct i2c_board_info __initdata poodle_i2c_devices[] = { { I2C_BOARD_INFO("wm8731", 0x1b) }, }; +static struct iio_map locomo_iio_map[] = { + { + .consumer_dev_name ="locomo-lcd.0" , + .consumer_channel ="comadj" , + .adc_channel_label ="CH0" , + }, + { } +}; + +static struct i2c_board_info locomo_i2c_devs[]__initdata = { + { +I2C_BOARD_INFO ("m62332" ,0x4e ), + .platform_data = locomo_iio_map, + }, +};
arch/arm/mach-pxa/poodle.c static struct i2c_board_info __initdata poodle_i2c_devices[] = { · line 452
Quoted 10 lines
arch/arm/mach-pxa/poodle.c +10
-0+ +static struct gpiod_lookup_table poodle_audio_gpios_table = { + .dev_id ="poodle-audio" , + .table = { +GPIO_LOOKUP ("locomo-gpio" ,10 ,"mute-l" ,GPIO_ACTIVE_LOW ), +GPIO_LOOKUP ("locomo-gpio" ,11 ,"mute-r" ,GPIO_ACTIVE_LOW ), +GPIO_LOOKUP ("locomo-gpio" ,8 ,"amp-on" ,GPIO_ACTIVE_LOW ), + { }, + }, +}, poodle_bl_gpios_table = {
Same comment as previous patch...
arch/arm/mach-pxa/poodle.c static struct i2c_board_info __initdata poodle_i2c_devices[] = { · line 458
Quoted 6 lines
arch/arm/mach-pxa/poodle.c +6
-0+ .dev_id = "locomo-backlight.0", + .table = { +GPIO_LOOKUP ("locomo-gpio" ,9 ,"flvr" ,GPIO_ACTIVE_HIGH ), + { }, + }, +}, poodle_lcd_gpios_table = {
Ditto...
Quoted 38 lines
arch/arm/mach-pxa/poodle.c +18
-0+ .dev_id = "locomo-lcd.0", + .table = { +GPIO_LOOKUP ("locomo-gpio" ,4 ,"VSHA" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("locomo-gpio" ,5 ,"VSHD" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("locomo-gpio" ,6 ,"Vee" ,GPIO_ACTIVE_HIGH ), + GPIO_LOOKUP("locomo-gpio", 7, "MOD", GPIO_ACTIVE_HIGH), + { }, + }, +}; +static void poodle_poweroff (void ) {pxa_restart (REBOOT_HARD ,NULL );@@ -445,6 +487,13 @@ static void __init poodle_init(void) platform_scoop_config = &poodle_pcmcia_config; +if (sharpsl_param.comadj !=-1 ) + locomo_info.comadj = sharpsl_param.comadj; + +gpiod_add_lookup_table (&poodle_audio_gpios_table); +gpiod_add_lookup_table (&poodle_bl_gpios_table); +gpiod_add_lookup_table (&poodle_lcd_gpios_table); + ret =platform_add_devices (devices,ARRAY_SIZE (devices));if (ret)pr_warn ("poodle: Unable to register LoCoMo device\n" );@@ -455,6 +504,7 @@ static void __init poodle_init(void)pxa_set_ficp_info (&poodle_ficp_platform_data);pxa_set_i2c_info (NULL );i2c_register_board_info (0 ,ARRAY_AND_SIZE (poodle_i2c_devices)); +i2c_register_board_info (1 ,ARRAY_AND_SIZE (locomo_i2c_devs));poodle_init_spi ();regulator_has_full_constraints (); }Signature · 1 line
2.1.4
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH v5 15/17 ARM: pxa: poodle: don't preallocate IRQ space for locomo
In reply to Dmitry Eremin-SolenikovAs new locomo driver supports SPARSE_IRQ, don't preallocate NR_IRQS space for it on poodle.
--- arch/arm/mach-pxa/include/mach/poodle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-pxa/include/mach/poodle.h +1 -1
@@ -81,7 +81,7 @@#define POODLE_GPIO_L_LCLK (POODLE_SCOOP_GPIO_BASE + 10)#define POODLE_GPIO_HS_OUT (POODLE_SCOOP_GPIO_BASE + 11) -#define POODLE_NR_IRQS (IRQ_BOARD_START + 4)/* 4 for LoCoMo */ +#define POODLE_NR_IRQS IRQ_BOARD_STARTextern struct platform_device poodle_locomo_device;
Signature · 1 line
2.1.4
PATCH v5 16/17 video: backlight: drop old locomo bl/lcd driver
In reply to Dmitry Eremin-SolenikovOld locomolcd driver is now completely obsolete by new locomo_bl and locomo_lcd drivers, so let's drop it.
--- drivers/video/backlight/locomolcd.c | 255 ------------------------------------ 1 file changed, 255 deletions(-) delete mode 100644 drivers/video/backlight/locomolcd.c
drivers/video/backlight/locomolcd.c deleted +0 -255
@@ -1,255 +0,0 @@ -/* -* Backlight control code for Sharp Zaurus SL-5500 -* -* Copyright 2005 John Lenz <[email protected]> -* Maintainer: Pavel Machek <[email protected]> (unless John wants to :-) -* GPL v2 -* -* This driver assumes single CPU. That's okay, because collie is -* slightly old hardware, and no one is going to retrofit second CPU to -* old PDA. -*/ - -/* LCD power functions */ -#include <linux/module.h> -#include <linux/init.h> -#include <linux/delay.h> -#include <linux/device.h> -#include <linux/interrupt.h> -#include <linux/fb.h> -#include <linux/backlight.h> - -#include <asm/hardware/locomo.h> -#include <asm/irq.h> -#include <asm/mach/sharpsl_param.h> -#include <asm/mach-types.h> - -#include "../../../arch/arm/mach-sa1100/generic.h" - -static struct backlight_device *locomolcd_bl_device; -static struct locomo_dev *locomolcd_dev; -static unsigned long locomolcd_flags; -#define LOCOMOLCD_SUSPENDED 0x01 - -static void locomolcd_on (int comadj) -{ -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHA_ON ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHA_ON ,1 ); -mdelay (2 ); - -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHD_ON ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHD_ON ,1 ); -mdelay (2 ); - -locomo_m62332_senddata (locomolcd_dev, comadj,0 ); -mdelay (5 ); - -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VEE_ON ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VEE_ON ,1 ); -mdelay (10 ); - -/* TFTCRST | CPSOUT=0 | CPSEN */ -locomo_writel (0x01 , locomolcd_dev->mapbase +LOCOMO_TC ); - -/* Set CPSD */ -locomo_writel (6 , locomolcd_dev->mapbase +LOCOMO_CPSD ); - -/* TFTCRST | CPSOUT=0 | CPSEN */ -locomo_writel ((0x04 |0x01 ), locomolcd_dev->mapbase +LOCOMO_TC ); -mdelay (10 ); - -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_MOD ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_MOD ,1 ); -} - -static void locomolcd_off (int comadj) -{ -/* TFTCRST=1 | CPSOUT=1 | CPSEN = 0 */ -locomo_writel (0x06 , locomolcd_dev->mapbase +LOCOMO_TC ); -mdelay (1 ); - -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHA_ON ,0 ); -mdelay (110 ); - -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VEE_ON ,0 ); -mdelay (700 ); - -/* TFTCRST=0 | CPSOUT=0 | CPSEN = 0 */ -locomo_writel (0 , locomolcd_dev->mapbase +LOCOMO_TC ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_MOD ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHD_ON ,0 ); -} - -void locomolcd_power (int on) -{ -int comadj = sharpsl_param.comadj; -unsigned long flags; - -local_irq_save (flags); - -if (!locomolcd_dev) { -local_irq_restore (flags); -return ; - } - -/* read comadj */ -if (comadj ==-1 &&machine_is_collie ()) - comadj =128 ; -if (comadj ==-1 &&machine_is_poodle ()) - comadj =118 ; - -if (on) -locomolcd_on (comadj); -else -locomolcd_off (comadj); - -local_irq_restore (flags); -} -EXPORT_SYMBOL (locomolcd_power); - -static int current_intensity; - -static int locomolcd_set_intensity (struct backlight_device *bd) -{ -int intensity = bd->props.brightness; - -if (bd->props.power !=FB_BLANK_UNBLANK ) - intensity =0 ; -if (bd->props.fb_blank !=FB_BLANK_UNBLANK ) - intensity =0 ; -if (locomolcd_flags &LOCOMOLCD_SUSPENDED ) - intensity =0 ; - -switch (intensity) { -/* -* AC and non-AC are handled differently, -* but produce same results in sharp code? -*/ -case 0 : -locomo_frontlight_set (locomolcd_dev,0 ,0 ,161 ); -break ; -case 1 : -locomo_frontlight_set (locomolcd_dev,117 ,0 ,161 ); -break ; -case 2 : -locomo_frontlight_set (locomolcd_dev,163 ,0 ,148 ); -break ; -case 3 : -locomo_frontlight_set (locomolcd_dev,194 ,0 ,161 ); -break ; -case 4 : -locomo_frontlight_set (locomolcd_dev,194 ,1 ,161 ); -break ; -default : -return -ENODEV ; - } - current_intensity = intensity; -return 0 ; -} - -static int locomolcd_get_intensity (struct backlight_device *bd) -{ -return current_intensity; -} - -static const struct backlight_ops locomobl_data = { - .get_brightness = locomolcd_get_intensity, - .update_status = locomolcd_set_intensity, -}; - -#ifdef CONFIG_PM_SLEEP -static int locomolcd_suspend (struct device *dev) -{ - locomolcd_flags |=LOCOMOLCD_SUSPENDED ; -locomolcd_set_intensity (locomolcd_bl_device); -return 0 ; -} - -static int locomolcd_resume (struct device *dev) -{ - locomolcd_flags &= ~LOCOMOLCD_SUSPENDED ; -locomolcd_set_intensity (locomolcd_bl_device); -return 0 ; -} -#endif - -static SIMPLE_DEV_PM_OPS(locomolcd_pm_ops, locomolcd_suspend, locomolcd_resume); - -static int locomolcd_probe (struct locomo_dev *ldev) -{ -struct backlight_properties props; -unsigned long flags; - -local_irq_save (flags); - locomolcd_dev = ldev; - -locomo_gpio_set_dir (ldev->dev.parent,LOCOMO_GPIO_FL_VR ,0 ); - -/* -* the poodle_lcd_power function is called for the first time -* from fs_initcall, which is before locomo is activated. -* We need to recall poodle_lcd_power here -*/ -if (machine_is_poodle ()) -locomolcd_power (1 ); - -local_irq_restore (flags); - -memset (&props,0 ,sizeof (struct backlight_properties )); - props.type =BACKLIGHT_RAW ; - props.max_brightness =4 ; - locomolcd_bl_device =backlight_device_register ("locomo-bl" , - &ldev->dev,NULL , - &locomobl_data, &props); - -if (IS_ERR (locomolcd_bl_device)) -return PTR_ERR (locomolcd_bl_device); - -/* Set up frontlight so that screen is readable */ - locomolcd_bl_device->props.brightness =2 ; -locomolcd_set_intensity (locomolcd_bl_device); - -return 0 ; -} - -static int locomolcd_remove (struct locomo_dev *dev) -{ -unsigned long flags; - - locomolcd_bl_device->props.brightness =0 ; - locomolcd_bl_device->props.power =0 ; -locomolcd_set_intensity (locomolcd_bl_device); - -backlight_device_unregister (locomolcd_bl_device); -local_irq_save (flags); - locomolcd_dev =NULL ; -local_irq_restore (flags); -return 0 ; -} - -static struct locomo_driver poodle_lcd_driver = { - .drv = { - .name ="locomo-backlight" , - .pm = &locomolcd_pm_ops, - }, - .devid =LOCOMO_DEVID_BACKLIGHT , - .probe = locomolcd_probe, - .remove = locomolcd_remove, -}; - -static int __init locomolcd_init (void ) -{ -return locomo_driver_register (&poodle_lcd_driver); -} - -static void __exit locomolcd_exit(void) -{ -locomo_driver_unregister (&poodle_lcd_driver); -} - -module_init (locomolcd_init); -module_exit (locomolcd_exit); - -MODULE_AUTHOR ("John Lenz <[email protected]>, Pavel Machek <[email protected]>" ); -MODULE_DESCRIPTION ("Collie LCD driver" ); -MODULE_LICENSE ("GPL" );
Signature · 1 line
2.1.4
PATCH v5 16/17 video: backlight: drop old locomo bl/lcd driver
Quoted 8 lines · Dmitry Eremin-Solenikov
Old locomolcd driver is now completely obsolete by new
locomo_blandlocomo_lcddrivers, so let's drop it.Signed-off-by Dmitry Eremin-Solenikov <[email protected]>--- drivers/video/backlight/locomolcd.c | 255 ------------------------------------ 1 file changed, 255 deletions(-) delete mode 100644 drivers/video/backlight/locomolcd.c
Quoted 261 lines
drivers/video/backlight/locomolcd.c deleted +0
-255@@ -1,255 +0,0 @@ -/* -* Backlight control code for Sharp Zaurus SL-5500 -* -* Copyright 2005 John Lenz <[email protected]> -* Maintainer: Pavel Machek <[email protected]> (unless John wants to :-) -* GPL v2 -* -* This driver assumes single CPU. That's okay, because collie is -* slightly old hardware, and no one is going to retrofit second CPU to -* old PDA. -*/ - -/* LCD power functions */ -#include <linux/module.h> -#include <linux/init.h> -#include <linux/delay.h> -#include <linux/device.h> -#include <linux/interrupt.h> -#include <linux/fb.h> -#include <linux/backlight.h> - -#include <asm/hardware/locomo.h> -#include <asm/irq.h> -#include <asm/mach/sharpsl_param.h> -#include <asm/mach-types.h> - -#include "../../../arch/arm/mach-sa1100/generic.h" - -static struct backlight_device *locomolcd_bl_device; -static struct locomo_dev *locomolcd_dev; -static unsigned long locomolcd_flags; -#define LOCOMOLCD_SUSPENDED 0x01 - -static void locomolcd_on (int comadj) -{ -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHA_ON ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHA_ON ,1 ); -mdelay (2 ); - -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHD_ON ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHD_ON ,1 ); -mdelay (2 ); - -locomo_m62332_senddata (locomolcd_dev, comadj,0 ); -mdelay (5 ); - -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VEE_ON ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VEE_ON ,1 ); -mdelay (10 ); - -/* TFTCRST | CPSOUT=0 | CPSEN */ -locomo_writel (0x01 , locomolcd_dev->mapbase +LOCOMO_TC ); - -/* Set CPSD */ -locomo_writel (6 , locomolcd_dev->mapbase +LOCOMO_CPSD ); - -/* TFTCRST | CPSOUT=0 | CPSEN */ -locomo_writel ((0x04 |0x01 ), locomolcd_dev->mapbase +LOCOMO_TC ); -mdelay (10 ); - -locomo_gpio_set_dir (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_MOD ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_MOD ,1 ); -} - -static void locomolcd_off (int comadj) -{ -/* TFTCRST=1 | CPSOUT=1 | CPSEN = 0 */ -locomo_writel (0x06 , locomolcd_dev->mapbase +LOCOMO_TC ); -mdelay (1 ); - -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHA_ON ,0 ); -mdelay (110 ); - -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VEE_ON ,0 ); -mdelay (700 ); - -/* TFTCRST=0 | CPSOUT=0 | CPSEN = 0 */ -locomo_writel (0 , locomolcd_dev->mapbase +LOCOMO_TC ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_MOD ,0 ); -locomo_gpio_write (locomolcd_dev->dev.parent,LOCOMO_GPIO_LCD_VSHD_ON ,0 ); -} - -void locomolcd_power (int on) -{ -int comadj = sharpsl_param.comadj; -unsigned long flags; - -local_irq_save (flags); - -if (!locomolcd_dev) { -local_irq_restore (flags); -return ; - } - -/* read comadj */ -if (comadj ==-1 &&machine_is_collie ()) - comadj =128 ; -if (comadj ==-1 &&machine_is_poodle ()) - comadj =118 ; - -if (on) -locomolcd_on (comadj); -else -locomolcd_off (comadj); - -local_irq_restore (flags); -} -EXPORT_SYMBOL (locomolcd_power); - -static int current_intensity; - -static int locomolcd_set_intensity (struct backlight_device *bd) -{ -int intensity = bd->props.brightness; - -if (bd->props.power !=FB_BLANK_UNBLANK ) - intensity =0 ; -if (bd->props.fb_blank !=FB_BLANK_UNBLANK ) - intensity =0 ; -if (locomolcd_flags &LOCOMOLCD_SUSPENDED ) - intensity =0 ; - -switch (intensity) { -/* -* AC and non-AC are handled differently, -* but produce same results in sharp code? -*/ -case 0 : -locomo_frontlight_set (locomolcd_dev,0 ,0 ,161 ); -break ; -case 1 : -locomo_frontlight_set (locomolcd_dev,117 ,0 ,161 ); -break ; -case 2 : -locomo_frontlight_set (locomolcd_dev,163 ,0 ,148 ); -break ; -case 3 : -locomo_frontlight_set (locomolcd_dev,194 ,0 ,161 ); -break ; -case 4 : -locomo_frontlight_set (locomolcd_dev,194 ,1 ,161 ); -break ; -default : -return -ENODEV ; - } - current_intensity = intensity; -return 0 ; -} - -static int locomolcd_get_intensity (struct backlight_device *bd) -{ -return current_intensity; -} - -static const struct backlight_ops locomobl_data = { - .get_brightness = locomolcd_get_intensity, - .update_status = locomolcd_set_intensity, -}; - -#ifdef CONFIG_PM_SLEEP -static int locomolcd_suspend (struct device *dev) -{ - locomolcd_flags |=LOCOMOLCD_SUSPENDED ; -locomolcd_set_intensity (locomolcd_bl_device); -return 0 ; -} - -static int locomolcd_resume (struct device *dev) -{ - locomolcd_flags &= ~LOCOMOLCD_SUSPENDED ; -locomolcd_set_intensity (locomolcd_bl_device); -return 0 ; -} -#endif - -static SIMPLE_DEV_PM_OPS(locomolcd_pm_ops, locomolcd_suspend, locomolcd_resume); - -static int locomolcd_probe (struct locomo_dev *ldev) -{ -struct backlight_properties props; -unsigned long flags; - -local_irq_save (flags); - locomolcd_dev = ldev; - -locomo_gpio_set_dir (ldev->dev.parent,LOCOMO_GPIO_FL_VR ,0 ); - -/* -* the poodle_lcd_power function is called for the first time -* from fs_initcall, which is before locomo is activated. -* We need to recall poodle_lcd_power here -*/ -if (machine_is_poodle ()) -locomolcd_power (1 ); - -local_irq_restore (flags); - -memset (&props,0 ,sizeof (struct backlight_properties )); - props.type =BACKLIGHT_RAW ; - props.max_brightness =4 ; - locomolcd_bl_device =backlight_device_register ("locomo-bl" , - &ldev->dev,NULL , - &locomobl_data, &props); - -if (IS_ERR (locomolcd_bl_device)) -return PTR_ERR (locomolcd_bl_device); - -/* Set up frontlight so that screen is readable */ - locomolcd_bl_device->props.brightness =2 ; -locomolcd_set_intensity (locomolcd_bl_device); - -return 0 ; -} - -static int locomolcd_remove (struct locomo_dev *dev) -{ -unsigned long flags; - - locomolcd_bl_device->props.brightness =0 ; - locomolcd_bl_device->props.power =0 ; -locomolcd_set_intensity (locomolcd_bl_device); - -backlight_device_unregister (locomolcd_bl_device); -local_irq_save (flags); - locomolcd_dev =NULL ; -local_irq_restore (flags); -return 0 ; -} - -static struct locomo_driver poodle_lcd_driver = { - .drv = { - .name ="locomo-backlight" , - .pm = &locomolcd_pm_ops, - }, - .devid =LOCOMO_DEVID_BACKLIGHT , - .probe = locomolcd_probe, - .remove = locomolcd_remove, -}; - -static int __init locomolcd_init (void ) -{ -return locomo_driver_register (&poodle_lcd_driver); -} - -static void __exit locomolcd_exit(void) -{ -locomo_driver_unregister (&poodle_lcd_driver); -} - -module_init (locomolcd_init); -module_exit (locomolcd_exit); - -MODULE_AUTHOR ("John Lenz <[email protected]>, Pavel Machek <[email protected]>" ); -MODULE_DESCRIPTION ("Collie LCD driver" ); -MODULE_LICENSE ("GPL" );
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v5 17/17 ARM: drop old LoCoMo driver
In reply to Dmitry Eremin-SolenikovAs there are no in-kernel users of old locomo driver, drop all alltogether. Remove Kconfig entry, driver and header.
--- arch/arm/common/Kconfig | 3 - arch/arm/common/Makefile | 1 - arch/arm/common/locomo.c | 914 --------------------------------- arch/arm/include/asm/hardware/locomo.h | 221 -------- 4 files changed, 1139 deletions(-) delete mode 100644 arch/arm/common/locomo.c delete mode 100644 arch/arm/include/asm/hardware/locomo.h
arch/arm/common/Kconfig +0 -3
@@ -9,9 +9,6 @@ config DMABOUNCE bool select ZONE_DMA -config SHARP_LOCOMO - bool - config SHARP_PARAM bool
arch/arm/common/Makefile +0 -1
@@ -7,7 +7,6 @@ obj-y += firmware.o obj-$(CONFIG_ICST) += icst.o obj-$(CONFIG_SA1111) += sa1111.o obj-$(CONFIG_DMABOUNCE) += dmabounce.o -obj-$(CONFIG_SHARP_LOCOMO) += locomo.o obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o obj-$(CONFIG_SHARP_SCOOP) += scoop.o obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
arch/arm/common/locomo.c deleted +0 -914
914 lines not on this page · raw message
arch/arm/include/asm/hardware/locomo.h deleted +0 -221
221 lines not on this page · raw message
Signature · 1 line
2.1.4
v5 cover new LoCoMo driver set
In reply to Dmitry Eremin-SolenikovHello,
2015-06-08 23:56 GMT+03:00 Dmitry Eremin-Solenikov <[email protected]>:
Quoted 5 lines
Hello,
Russell, I understand that you are quite busy. Could you please find a small amount of time to review and comment/ack the sa1100/collie-related parts of the patchset. It looks like this serie misses only your blessing.
Russell? Can we please have any feedback?
Quoted 83 lines
Lee have agreed to merge this through the MFD tree, and the respective subsystem maintainers are also fine with this.
Changes since V4:
* Added all Acked-by lines.
* Dropped the SPI patch - no reaction from Mark Brown onto the latest version of the patch. It can go separately, as it adds new functionality.The following changes since commit
b787f68c36d49bb1d9236f403813641efa74a031:Linux 4.1-rc1 (2015-04-26 17:59:10 -0700)
are available in the git repository at:
git://git.infradead.org/users/dbaryshkov/zaurus.gitlocomo-v5for you to fetch changes up to
736e2f3b9c71c8baa0a260fcabe9a979e9bd8d5c:ARM: drop old LoCoMo driver (2015-06-08 23:36:10 +0300)
----------------------------------------------------------------
Dmitry Eremin-Solenikov (17):
mfd: add new driver for Sharp LoCoMo
leds: port locomo leds driver to new locomo core
input: convert LoCoMo keyboard driver to use new locomo core
input: locomokbd: differentiate between two Enter keys
input: make LoCoMo keyboard driver support both poodle and collie
video: backlight: add new locomo backlight driver
video: lcd: add LoCoMo LCD driver
gpio: port LoCoMo gpio support from old driver
gpio: locomo: implement per-pin irq handling
i2c: add locomo i2c driver
ARM: sa1100: make collie use new locomo drivers
ARM: sa1100: don't preallocate IRQ space for locomo
ASoC: pxa: poodle: make use of new locomo GPIO interface
ARM: pxa: poodle: use new LoCoMo driver
ARM: pxa: poodle: don't preallocate IRQ space for locomo
video: backlight: drop old locomo bl/lcd driver
ARM: drop old LoCoMo driverarch/arm/common/Kconfig | 3 - arch/arm/common/Makefile | 1 - arch/arm/common/locomo.c | 914 ----------------------------- arch/arm/include/asm/hardware/locomo.h | 221 ------- arch/arm/mach-pxa/Kconfig | 1 - arch/arm/mach-pxa/include/mach/poodle.h | 8 +- arch/arm/mach-pxa/poodle.c | 58 +- arch/arm/mach-sa1100/Kconfig | 1 - arch/arm/mach-sa1100/collie.c | 213 +++++-- arch/arm/mach-sa1100/include/mach/collie.h | 16 +- arch/arm/mach-sa1100/include/mach/irqs.h | 19 +- drivers/gpio/Kconfig | 13 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-locomo.c | 285 +++++++++ drivers/i2c/busses/Kconfig | 12 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-locomo.c | 135 +++++ drivers/input/keyboard/Kconfig | 2 +- drivers/input/keyboard/locomokbd.c | 262 ++++----- drivers/leds/Kconfig | 2 +- drivers/leds/leds-locomo.c | 117 ++-- drivers/mfd/Kconfig | 10 + drivers/mfd/Makefile | 1 + drivers/mfd/locomo.c | 336 +++++++++++ drivers/video/backlight/Kconfig | 16 +- drivers/video/backlight/Makefile | 3 +- drivers/video/backlight/locomo_bl.c | 153 +++++ drivers/video/backlight/locomo_lcd.c | 285 +++++++++ drivers/video/backlight/locomolcd.c | 255 -------- include/linux/mfd/locomo.h | 169 ++++++ sound/soc/pxa/poodle.c | 52 +- 31 files changed, 1862 insertions(+), 1703 deletions(-) delete mode 100644 arch/arm/common/locomo.c delete mode 100644 arch/arm/include/asm/hardware/locomo.h create mode 100644 drivers/gpio/gpio-locomo.c create mode 100644 drivers/i2c/busses/i2c-locomo.c create mode 100644 drivers/mfd/locomo.c create mode 100644 drivers/video/backlight/locomo_bl.c create mode 100644 drivers/video/backlight/locomo_lcd.c delete mode 100644 drivers/video/backlight/locomolcd.c create mode 100644 include/linux/mfd/locomo.h
Signature · 2 lines
With best wishes Dmitry