diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 14:34:32 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 14:34:32 -0400 |
| commit | 10c8e0562057b5d64ea170feab148e1550420030 (patch) | |
| tree | cfd387208c85e893c93d24e324d147eb6e9abfc9 /include | |
| parent | d4e1f5a14e17d4f0e8034c0967511884bcb12fba (diff) | |
| parent | 3e528cb7bae00ba0d73def6645d0f2fa906ee3e8 (diff) | |
Merge tag 'drivers-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver changes from Olof Johansson:
"A handful of driver-related changes. We've had a bunch of them going
in through other branches as well, so it's only a part of what we
really have this release.
Larger pieces are:
- Removal of a now unused PWM driver for atmel
[ This includes AVR32 changes that have been appropriately acked ]
- Performance counter support for the arm CCN interconnect
- OMAP mailbox driver cleanups and consolidation
- PCI and SATA PHY drivers for SPEAr 13xx platforms
- Redefinition (with backwards compatibility!) of PCI DT bindings for
Tegra to better model regulators/power"
Note: this merge also fixes up the semantic conflict with the new
calling convention for devm_phy_create(), see commit f0ed817638b5 ("phy:
core: Let node ptr of PHY point to PHY and not of PHY provider") that
came in through Greg's USB tree.
Semantic merge patch by Stephen Rothwell <sfr@canb.auug.org.au> through
the next tree.
* tag 'drivers-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (38 commits)
bus: arm-ccn: Fix error handling at event allocation
mailbox/omap: add a parent structure for every IP instance
mailbox/omap: remove the private mailbox structure
mailbox/omap: consolidate OMAP mailbox driver
mailbox/omap: simplify the fifo assignment by using macros
mailbox/omap: remove omap_mbox_type_t from mailbox ops
mailbox/omap: remove OMAP1 mailbox driver
mailbox/omap: use devm_* interfaces
bus: ARM CCN: add PERF_EVENTS dependency
bus: ARM CCN PMU driver
PCI: spear: Remove spear13xx_pcie_remove()
PCI: spear: Fix Section mismatch compilation warning for probe()
ARM: tegra: Remove legacy PCIe power supply properties
PCI: tegra: Remove deprecated power supply properties
PCI: tegra: Implement accurate power supply scheme
ARM: SPEAr13xx: Update defconfigs
ARM: SPEAr13xx: Add pcie and miphy DT nodes
ARM: SPEAr13xx: Add bindings and dt node for misc block
ARM: SPEAr13xx: Fix static mapping table
phy: Add drivers for PCIe and SATA phy on SPEAr13xx
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/atmel-pwm-bl.h | 43 | ||||
| -rw-r--r-- | include/linux/atmel_pwm.h | 70 |
2 files changed, 0 insertions, 113 deletions
diff --git a/include/linux/atmel-pwm-bl.h b/include/linux/atmel-pwm-bl.h deleted file mode 100644 index 0153a47806c2..000000000000 --- a/include/linux/atmel-pwm-bl.h +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007 Atmel Corporation | ||
| 3 | * | ||
| 4 | * Driver for the AT32AP700X PS/2 controller (PSIF). | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License version 2 as published | ||
| 8 | * by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __INCLUDE_ATMEL_PWM_BL_H | ||
| 12 | #define __INCLUDE_ATMEL_PWM_BL_H | ||
| 13 | |||
| 14 | /** | ||
| 15 | * struct atmel_pwm_bl_platform_data | ||
| 16 | * @pwm_channel: which PWM channel in the PWM module to use. | ||
| 17 | * @pwm_frequency: PWM frequency to generate, the driver will try to be as | ||
| 18 | * close as the prescaler allows. | ||
| 19 | * @pwm_compare_max: value to use in the PWM channel compare register. | ||
| 20 | * @pwm_duty_max: maximum duty cycle value, must be less than or equal to | ||
| 21 | * pwm_compare_max. | ||
| 22 | * @pwm_duty_min: minimum duty cycle value, must be less than pwm_duty_max. | ||
| 23 | * @pwm_active_low: set to one if the low part of the PWM signal increases the | ||
| 24 | * brightness of the backlight. | ||
| 25 | * @gpio_on: GPIO line to control the backlight on/off, set to -1 if not used. | ||
| 26 | * @on_active_low: set to one if the on/off signal is on when GPIO is low. | ||
| 27 | * | ||
| 28 | * This struct must be added to the platform device in the board code. It is | ||
| 29 | * used by the atmel-pwm-bl driver to setup the GPIO to control on/off and the | ||
| 30 | * PWM device. | ||
| 31 | */ | ||
| 32 | struct atmel_pwm_bl_platform_data { | ||
| 33 | unsigned int pwm_channel; | ||
| 34 | unsigned int pwm_frequency; | ||
| 35 | unsigned int pwm_compare_max; | ||
| 36 | unsigned int pwm_duty_max; | ||
| 37 | unsigned int pwm_duty_min; | ||
| 38 | unsigned int pwm_active_low; | ||
| 39 | int gpio_on; | ||
| 40 | unsigned int on_active_low; | ||
| 41 | }; | ||
| 42 | |||
| 43 | #endif /* __INCLUDE_ATMEL_PWM_BL_H */ | ||
diff --git a/include/linux/atmel_pwm.h b/include/linux/atmel_pwm.h deleted file mode 100644 index ea04abb3db8e..000000000000 --- a/include/linux/atmel_pwm.h +++ /dev/null | |||
| @@ -1,70 +0,0 @@ | |||
| 1 | #ifndef __LINUX_ATMEL_PWM_H | ||
| 2 | #define __LINUX_ATMEL_PWM_H | ||
| 3 | |||
| 4 | /** | ||
| 5 | * struct pwm_channel - driver handle to a PWM channel | ||
| 6 | * @regs: base of this channel's registers | ||
| 7 | * @index: number of this channel (0..31) | ||
| 8 | * @mck: base clock rate, which can be prescaled and maybe subdivided | ||
| 9 | * | ||
| 10 | * Drivers initialize a pwm_channel structure using pwm_channel_alloc(). | ||
| 11 | * Then they configure its clock rate (derived from MCK), alignment, | ||
| 12 | * polarity, and duty cycle by writing directly to the channel registers, | ||
| 13 | * before enabling the channel by calling pwm_channel_enable(). | ||
| 14 | * | ||
| 15 | * After emitting a PWM signal for the desired length of time, drivers | ||
| 16 | * may then pwm_channel_disable() or pwm_channel_free(). Both of these | ||
| 17 | * disable the channel, but when it's freed the IRQ is deconfigured and | ||
| 18 | * the channel must later be re-allocated and reconfigured. | ||
| 19 | * | ||
| 20 | * Note that if the period or duty cycle need to be changed while the | ||
| 21 | * PWM channel is operating, drivers must use the PWM_CUPD double buffer | ||
| 22 | * mechanism, either polling until they change or getting implicitly | ||
| 23 | * notified through a once-per-period interrupt handler. | ||
| 24 | */ | ||
| 25 | struct pwm_channel { | ||
| 26 | void __iomem *regs; | ||
| 27 | unsigned index; | ||
| 28 | unsigned long mck; | ||
| 29 | }; | ||
| 30 | |||
| 31 | extern int pwm_channel_alloc(int index, struct pwm_channel *ch); | ||
| 32 | extern int pwm_channel_free(struct pwm_channel *ch); | ||
| 33 | |||
| 34 | extern int pwm_clk_alloc(unsigned prescale, unsigned div); | ||
| 35 | extern void pwm_clk_free(unsigned clk); | ||
| 36 | |||
| 37 | extern int __pwm_channel_onoff(struct pwm_channel *ch, int enabled); | ||
| 38 | |||
| 39 | #define pwm_channel_enable(ch) __pwm_channel_onoff((ch), 1) | ||
| 40 | #define pwm_channel_disable(ch) __pwm_channel_onoff((ch), 0) | ||
| 41 | |||
| 42 | /* periodic interrupts, mostly for CUPD changes to period or cycle */ | ||
| 43 | extern int pwm_channel_handler(struct pwm_channel *ch, | ||
| 44 | void (*handler)(struct pwm_channel *ch)); | ||
| 45 | |||
| 46 | /* per-channel registers (banked at pwm_channel->regs) */ | ||
| 47 | #define PWM_CMR 0x00 /* mode register */ | ||
| 48 | #define PWM_CPR_CPD (1 << 10) /* set: CUPD modifies period */ | ||
| 49 | #define PWM_CPR_CPOL (1 << 9) /* set: idle high */ | ||
| 50 | #define PWM_CPR_CALG (1 << 8) /* set: center align */ | ||
| 51 | #define PWM_CPR_CPRE (0xf << 0) /* mask: rate is mck/(2^pre) */ | ||
| 52 | #define PWM_CPR_CLKA (0xb << 0) /* rate CLKA */ | ||
| 53 | #define PWM_CPR_CLKB (0xc << 0) /* rate CLKB */ | ||
| 54 | #define PWM_CDTY 0x04 /* duty cycle (max of CPRD) */ | ||
| 55 | #define PWM_CPRD 0x08 /* period (count up from zero) */ | ||
| 56 | #define PWM_CCNT 0x0c /* counter (20 bits?) */ | ||
| 57 | #define PWM_CUPD 0x10 /* update CPRD (or CDTY) next period */ | ||
| 58 | |||
| 59 | static inline void | ||
| 60 | pwm_channel_writel(struct pwm_channel *pwmc, unsigned offset, u32 val) | ||
| 61 | { | ||
| 62 | __raw_writel(val, pwmc->regs + offset); | ||
| 63 | } | ||
| 64 | |||
| 65 | static inline u32 pwm_channel_readl(struct pwm_channel *pwmc, unsigned offset) | ||
| 66 | { | ||
| 67 | return __raw_readl(pwmc->regs + offset); | ||
| 68 | } | ||
| 69 | |||
| 70 | #endif /* __LINUX_ATMEL_PWM_H */ | ||
