Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: ep93xx: move pinctrl interfaces into include/linux/soc

ep93xx does not have a proper pinctrl driver, but does things
ad-hoc through mach/platform.h, which is also used for setting
up the boards.

To avoid using mach/*.h headers completely, let's move the interfaces
into include/linux/soc/. This is far from great, but gets the job
done here, without the need for a proper pinctrl driver.

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>

authored by

Arnd Bergmann and committed by
Olof Johansson
67e38f57 dfb6db00

+48 -25
+1
arch/arm/mach-ep93xx/clock.c
··· 20 20 #include <linux/io.h> 21 21 #include <linux/spinlock.h> 22 22 #include <linux/clkdev.h> 23 + #include <linux/soc/cirrus/ep93xx.h> 23 24 24 25 #include <mach/hardware.h> 25 26
+2
arch/arm/mach-ep93xx/core.c
··· 43 43 #include <linux/platform_data/video-ep93xx.h> 44 44 #include <linux/platform_data/keypad-ep93xx.h> 45 45 #include <linux/platform_data/spi-ep93xx.h> 46 + #include <linux/soc/cirrus/ep93xx.h> 47 + 46 48 #include <mach/gpio-ep93xx.h> 47 49 48 50 #include <asm/mach/arch.h>
-16
arch/arm/mach-ep93xx/include/mach/platform.h
··· 19 19 void ep93xx_map_io(void); 20 20 void ep93xx_init_irq(void); 21 21 22 - #define EP93XX_CHIP_REV_D0 3 23 - #define EP93XX_CHIP_REV_D1 4 24 - #define EP93XX_CHIP_REV_E0 5 25 - #define EP93XX_CHIP_REV_E1 6 26 - #define EP93XX_CHIP_REV_E2 7 27 - 28 - unsigned int ep93xx_chip_revision(void); 29 - 30 22 void ep93xx_register_flash(unsigned int width, 31 23 resource_size_t start, resource_size_t size); 32 24 ··· 28 36 struct spi_board_info *devices, int num); 29 37 void ep93xx_register_fb(struct ep93xxfb_mach_info *data); 30 38 void ep93xx_register_pwm(int pwm0, int pwm1); 31 - int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); 32 - void ep93xx_pwm_release_gpio(struct platform_device *pdev); 33 39 void ep93xx_register_keypad(struct ep93xx_keypad_platform_data *data); 34 - int ep93xx_keypad_acquire_gpio(struct platform_device *pdev); 35 - void ep93xx_keypad_release_gpio(struct platform_device *pdev); 36 40 void ep93xx_register_i2s(void); 37 - int ep93xx_i2s_acquire(void); 38 - void ep93xx_i2s_release(void); 39 41 void ep93xx_register_ac97(void); 40 42 void ep93xx_register_ide(void); 41 43 void ep93xx_register_adc(void); 42 - int ep93xx_ide_acquire_gpio(struct platform_device *pdev); 43 - void ep93xx_ide_release_gpio(struct platform_device *pdev); 44 44 45 45 struct device *ep93xx_init_devices(void); 46 46 extern void ep93xx_timer_init(void);
+1 -1
drivers/ata/pata_ep93xx.c
··· 44 44 #include <linux/ktime.h> 45 45 46 46 #include <linux/platform_data/dma-ep93xx.h> 47 - #include <mach/platform.h> 47 + #include <linux/soc/cirrus/ep93xx.h> 48 48 49 49 #define DRV_NAME "ep93xx-ide" 50 50 #define DRV_VERSION "1.0"
+1 -2
drivers/input/keyboard/ep93xx_keypad.c
··· 27 27 #include <linux/io.h> 28 28 #include <linux/input/matrix_keypad.h> 29 29 #include <linux/slab.h> 30 - 31 - #include <mach/hardware.h> 30 + #include <linux/soc/cirrus/ep93xx.h> 32 31 #include <linux/platform_data/keypad-ep93xx.h> 33 32 34 33 /*
+1 -1
drivers/pwm/pwm-ep93xx.c
··· 35 35 36 36 #include <asm/div64.h> 37 37 38 - #include <mach/platform.h> /* for ep93xx_pwm_{acquire,release}_gpio() */ 38 + #include <linux/soc/cirrus/ep93xx.h> /* for ep93xx_pwm_{acquire,release}_gpio() */ 39 39 40 40 #define EP93XX_PWMx_TERM_COUNT 0x00 41 41 #define EP93XX_PWMx_DUTY_CYCLE 0x04
+37
include/linux/soc/cirrus/ep93xx.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _SOC_EP93XX_H 3 + #define _SOC_EP93XX_H 4 + 5 + struct platform_device; 6 + 7 + #define EP93XX_CHIP_REV_D0 3 8 + #define EP93XX_CHIP_REV_D1 4 9 + #define EP93XX_CHIP_REV_E0 5 10 + #define EP93XX_CHIP_REV_E1 6 11 + #define EP93XX_CHIP_REV_E2 7 12 + 13 + #ifdef CONFIG_ARCH_EP93XX 14 + int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); 15 + void ep93xx_pwm_release_gpio(struct platform_device *pdev); 16 + int ep93xx_ide_acquire_gpio(struct platform_device *pdev); 17 + void ep93xx_ide_release_gpio(struct platform_device *pdev); 18 + int ep93xx_keypad_acquire_gpio(struct platform_device *pdev); 19 + void ep93xx_keypad_release_gpio(struct platform_device *pdev); 20 + int ep93xx_i2s_acquire(void); 21 + void ep93xx_i2s_release(void); 22 + unsigned int ep93xx_chip_revision(void); 23 + 24 + #else 25 + static inline int ep93xx_pwm_acquire_gpio(struct platform_device *pdev) { return 0; } 26 + static inline void ep93xx_pwm_release_gpio(struct platform_device *pdev) {} 27 + static inline int ep93xx_ide_acquire_gpio(struct platform_device *pdev) { return 0; } 28 + static inline void ep93xx_ide_release_gpio(struct platform_device *pdev) {} 29 + static inline int ep93xx_keypad_acquire_gpio(struct platform_device *pdev) { return 0; } 30 + static inline void ep93xx_keypad_release_gpio(struct platform_device *pdev) {} 31 + static inline int ep93xx_i2s_acquire(void) { return 0; } 32 + static inline void ep93xx_i2s_release(void) {} 33 + static inline unsigned int ep93xx_chip_revision(void) { return 0; } 34 + 35 + #endif 36 + 37 + #endif
+1 -1
sound/soc/cirrus/edb93xx.c
··· 22 22 #include <linux/platform_device.h> 23 23 #include <linux/gpio.h> 24 24 #include <linux/module.h> 25 + #include <linux/soc/cirrus/ep93xx.h> 25 26 #include <sound/core.h> 26 27 #include <sound/pcm.h> 27 28 #include <sound/soc.h> 28 29 #include <asm/mach-types.h> 29 - #include <mach/hardware.h> 30 30 31 31 static int edb93xx_hw_params(struct snd_pcm_substream *substream, 32 32 struct snd_pcm_hw_params *params)
+1
sound/soc/cirrus/ep93xx-ac97.c
··· 24 24 #include <sound/soc.h> 25 25 26 26 #include <linux/platform_data/dma-ep93xx.h> 27 + #include <linux/soc/cirrus/ep93xx.h> 27 28 28 29 #include "ep93xx-pcm.h" 29 30
+1 -2
sound/soc/cirrus/ep93xx-i2s.c
··· 27 27 #include <sound/initval.h> 28 28 #include <sound/soc.h> 29 29 30 - #include <mach/hardware.h> 31 - #include <mach/ep93xx-regs.h> 32 30 #include <linux/platform_data/dma-ep93xx.h> 31 + #include <linux/soc/cirrus/ep93xx.h> 33 32 34 33 #include "ep93xx-pcm.h" 35 34
+1 -1
sound/soc/cirrus/simone.c
··· 13 13 #include <linux/init.h> 14 14 #include <linux/module.h> 15 15 #include <linux/platform_device.h> 16 + #include <linux/soc/cirrus/ep93xx.h> 16 17 17 18 #include <sound/core.h> 18 19 #include <sound/pcm.h> 19 20 #include <sound/soc.h> 20 21 21 22 #include <asm/mach-types.h> 22 - #include <mach/hardware.h> 23 23 24 24 static struct snd_soc_dai_link simone_dai = { 25 25 .name = "AC97",
+1 -1
sound/soc/cirrus/snappercl15.c
··· 13 13 14 14 #include <linux/platform_device.h> 15 15 #include <linux/module.h> 16 + #include <linux/soc/cirrus/ep93xx.h> 16 17 #include <sound/core.h> 17 18 #include <sound/pcm.h> 18 19 #include <sound/soc.h> 19 20 20 21 #include <asm/mach-types.h> 21 - #include <mach/hardware.h> 22 22 23 23 #include "../codecs/tlv320aic23.h" 24 24