mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-27 13:05:03 +08:00
c673a2b400
Commit 21f2aae91e902aad ("leds: leds-gpio: Add support for GPIO descriptors") already converted most of the driver to use GPIO descriptors. What is still missing is the platform specific hook gpio_blink_set() and board files which pass legacy GPIO numbers to this driver in platform data. In this patch we handle the former and convert gpio_blink_set() to take GPIO descriptor instead. In order to do this we convert the existing four users to accept GPIO descriptor and translate it to legacy GPIO number in the platform code. This effectively "pushes" legacy GPIO number usage from the driver to platforms. Also add comment to the remaining block describing that it is legacy code path and we are getting rid of it eventually. Suggested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
56 lines
1.7 KiB
C
56 lines
1.7 KiB
C
/*
|
|
* Copyright 2006 Ben Dooks <ben-linux@fluff.org>
|
|
*
|
|
* Copyright (c) 2005 Simtec Electronics
|
|
* http://armlinux.simtec.co.uk/
|
|
* Ben Dooks <ben@simtec.co.uk>
|
|
*
|
|
* iPAQ H1940 series definitions
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef __MACH_S3C24XX_H1940_H
|
|
#define __MACH_S3C24XX_H1940_H __FILE__
|
|
|
|
#define H1940_SUSPEND_CHECKSUM (0x30003ff8)
|
|
#define H1940_SUSPEND_RESUMEAT (0x30081000)
|
|
#define H1940_SUSPEND_CHECK (0x30080000)
|
|
|
|
struct gpio_desc;
|
|
|
|
extern void h1940_pm_return(void);
|
|
extern int h1940_led_blink_set(struct gpio_desc *desc, int state,
|
|
unsigned long *delay_on,
|
|
unsigned long *delay_off);
|
|
|
|
#include <linux/gpio.h>
|
|
|
|
#define H1940_LATCH_GPIO(x) (S3C_GPIO_END + (x))
|
|
|
|
/* SD layer latch */
|
|
|
|
#define H1940_LATCH_LCD_P0 H1940_LATCH_GPIO(0)
|
|
#define H1940_LATCH_LCD_P1 H1940_LATCH_GPIO(1)
|
|
#define H1940_LATCH_LCD_P2 H1940_LATCH_GPIO(2)
|
|
#define H1940_LATCH_LCD_P3 H1940_LATCH_GPIO(3)
|
|
#define H1940_LATCH_MAX1698_nSHUTDOWN H1940_LATCH_GPIO(4)
|
|
#define H1940_LATCH_LED_RED H1940_LATCH_GPIO(5)
|
|
#define H1940_LATCH_SDQ7 H1940_LATCH_GPIO(6)
|
|
#define H1940_LATCH_USB_DP H1940_LATCH_GPIO(7)
|
|
|
|
/* CPU layer latch */
|
|
|
|
#define H1940_LATCH_UDA_POWER H1940_LATCH_GPIO(8)
|
|
#define H1940_LATCH_AUDIO_POWER H1940_LATCH_GPIO(9)
|
|
#define H1940_LATCH_SM803_ENABLE H1940_LATCH_GPIO(10)
|
|
#define H1940_LATCH_LCD_P4 H1940_LATCH_GPIO(11)
|
|
#define H1940_LATCH_SD_POWER H1940_LATCH_GPIO(12)
|
|
#define H1940_LATCH_BLUETOOTH_POWER H1940_LATCH_GPIO(13)
|
|
#define H1940_LATCH_LED_GREEN H1940_LATCH_GPIO(14)
|
|
#define H1940_LATCH_LED_FLASH H1940_LATCH_GPIO(15)
|
|
|
|
#endif /* __MACH_S3C24XX_H1940_H */
|