diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-04 05:24:55 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-04 05:24:55 +0300 |
commit | 6ce076f4159fcf7436cce1299b05eabe200592f4 (patch) | |
tree | c00abf9a9df35e14019c37395458ca3e44301c60 /drivers | |
parent | 2f3fbfdaf77f3ac417d0511fac221f76af79f6fc (diff) | |
parent | a04e84c57e9c5a98ba541f37961174ffe3abeb57 (diff) | |
download | linux-6ce076f4159fcf7436cce1299b05eabe200592f4.tar.xz |
Merge tag 'arm-soc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM SoC updates from Arnd Bergmann:
"These are mostly cosmetic changes and minor bugfixes for the SoC
specific code, across the 32-bit at91, mvebu, davinci, samsung, and
omap platforms.
The main notable changes are for the Samsung Exynos platform, which
sees a rewrite of gpio handling and a change to restore and adds a
workaround for a problem with cpuidle support"
* tag 'arm-soc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh()
MAINTAINERS: arm/amlogic: add designated reviewers
ARM: davinci: dm646x-evm: Simplify error handling in 'evm_sw_setup()'
ARM: davinci: Fix trivial spelling
ARM: davinci: Replace HTTP links with HTTPS ones
ARM: s3c24xx: Replace HTTP links with HTTPS ones
ARM: orion/gpio: Make use of for_each_requested_gpio()
ARM: at91: Replace HTTP links with HTTPS ones
ARM: at91: pm: add missing put_device() call in at91_pm_sram_init()
ARM: rpc: Change blacklist to quirklist in ecode.c file
ARM: OMAP: Replace HTTP links with HTTPS ones
ARM: s3c24xx: leds: Convert to use GPIO descriptors
udc: lpc32xx: mark local function static
ARM: exynos: MCPM: Restore big.LITTLE cpuidle support
ARM: exynos: clear L310_AUX_CTRL_FULL_LINE_ZERO in default l2c_aux_val
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/leds/leds-s3c24xx.c | 36 | ||||
-rw-r--r-- | drivers/usb/gadget/udc/lpc32xx_udc.c | 4 |
2 files changed, 9 insertions, 31 deletions
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index f8b8d6e313ee..9b5e67664ba3 100644 --- a/drivers/leds/leds-s3c24xx.c +++ b/drivers/leds/leds-s3c24xx.c @@ -11,19 +11,19 @@ #include <linux/kernel.h> #include <linux/platform_device.h> #include <linux/leds.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/slab.h> #include <linux/module.h> #include <linux/platform_data/leds-s3c24xx.h> #include <mach/regs-gpio.h> -#include <plat/gpio-cfg.h> /* our context */ struct s3c24xx_gpio_led { struct led_classdev cdev; struct s3c24xx_led_platdata *pdata; + struct gpio_desc *gpiod; }; static inline struct s3c24xx_gpio_led *to_gpio(struct led_classdev *led_cdev) @@ -35,20 +35,8 @@ static void s3c24xx_led_set(struct led_classdev *led_cdev, enum led_brightness value) { struct s3c24xx_gpio_led *led = to_gpio(led_cdev); - struct s3c24xx_led_platdata *pd = led->pdata; - int state = (value ? 1 : 0) ^ (pd->flags & S3C24XX_LEDF_ACTLOW); - /* there will be a short delay between setting the output and - * going from output to input when using tristate. */ - - gpio_set_value(pd->gpio, state); - - if (pd->flags & S3C24XX_LEDF_TRISTATE) { - if (value) - gpio_direction_output(pd->gpio, state); - else - gpio_direction_input(pd->gpio); - } + gpiod_set_value(led->gpiod, !!value); } static int s3c24xx_led_probe(struct platform_device *dev) @@ -69,22 +57,12 @@ static int s3c24xx_led_probe(struct platform_device *dev) led->pdata = pdata; - ret = devm_gpio_request(&dev->dev, pdata->gpio, "S3C24XX_LED"); - if (ret < 0) - return ret; - - /* no point in having a pull-up if we are always driving */ - - s3c_gpio_setpull(pdata->gpio, S3C_GPIO_PULL_NONE); - - if (pdata->flags & S3C24XX_LEDF_TRISTATE) - gpio_direction_input(pdata->gpio); - else - gpio_direction_output(pdata->gpio, - pdata->flags & S3C24XX_LEDF_ACTLOW ? 1 : 0); + /* Default to off */ + led->gpiod = devm_gpiod_get(&dev->dev, NULL, GPIOD_OUT_LOW); + if (IS_ERR(led->gpiod)) + return PTR_ERR(led->gpiod); /* register our new led device */ - ret = devm_led_classdev_register(&dev->dev, &led->cdev); if (ret < 0) dev_err(&dev->dev, "led_classdev_register failed\n"); diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c index 465d0b7c6522..4a112670cc6c 100644 --- a/drivers/usb/gadget/udc/lpc32xx_udc.c +++ b/drivers/usb/gadget/udc/lpc32xx_udc.c @@ -1926,7 +1926,7 @@ static const struct usb_ep_ops lpc32xx_ep_ops = { }; /* Send a ZLP on a non-0 IN EP */ -void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep) +static void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep) { /* Clear EP status */ udc_clearep_getsts(udc, ep->hwep_num); @@ -1940,7 +1940,7 @@ void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep) * This function will only be called when a delayed ZLP needs to be sent out * after a DMA transfer has filled both buffers. */ -void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep) +static void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep) { u32 epstatus; struct lpc32xx_request *req; |