diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-25 05:42:52 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-02-09 10:34:52 -0500 |
commit | e5c0fc4185c551c270868dcb6573604db2bc3171 (patch) | |
tree | 4b648c5839a80a9b955668daa37d1fad0bfb455c /arch/arm/common | |
parent | 3259701cc2969ae16a0018d7e3a89f327fa23a6e (diff) |
ARM: sa1111: change devid to be a bitmask
Change the sa1111 device id to be a bitmask. This allows us to
specify the actual device, while allowing a single driver to bind
to both PS2 devices.
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/sa1111.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 1366e82e6707..4bdf1bb283dc 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -158,7 +158,7 @@ static struct sa1111_dev_info sa1111_devices[] = { | |||
158 | { | 158 | { |
159 | .offset = SA1111_KBD, | 159 | .offset = SA1111_KBD, |
160 | .skpcr_mask = SKPCR_PTCLKEN, | 160 | .skpcr_mask = SKPCR_PTCLKEN, |
161 | .devid = SA1111_DEVID_PS2, | 161 | .devid = SA1111_DEVID_PS2_KBD, |
162 | .irq = { | 162 | .irq = { |
163 | IRQ_TPRXINT, | 163 | IRQ_TPRXINT, |
164 | IRQ_TPTXINT | 164 | IRQ_TPTXINT |
@@ -167,7 +167,7 @@ static struct sa1111_dev_info sa1111_devices[] = { | |||
167 | { | 167 | { |
168 | .offset = SA1111_MSE, | 168 | .offset = SA1111_MSE, |
169 | .skpcr_mask = SKPCR_PMCLKEN, | 169 | .skpcr_mask = SKPCR_PMCLKEN, |
170 | .devid = SA1111_DEVID_PS2, | 170 | .devid = SA1111_DEVID_PS2_MSE, |
171 | .irq = { | 171 | .irq = { |
172 | IRQ_MSRXINT, | 172 | IRQ_MSRXINT, |
173 | IRQ_MSTXINT | 173 | IRQ_MSTXINT |
@@ -835,12 +835,12 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
835 | has_devs = ~0; | 835 | has_devs = ~0; |
836 | if (machine_is_assabet() || machine_is_jornada720() || | 836 | if (machine_is_assabet() || machine_is_jornada720() || |
837 | machine_is_badge4()) | 837 | machine_is_badge4()) |
838 | has_devs &= ~(1 << 4); | 838 | has_devs &= ~SA1111_DEVID_PS2_MSE; |
839 | else | 839 | else |
840 | has_devs &= ~(1 << 1); | 840 | has_devs &= ~SA1111_DEVID_SAC; |
841 | 841 | ||
842 | for (i = 0; i < ARRAY_SIZE(sa1111_devices); i++) | 842 | for (i = 0; i < ARRAY_SIZE(sa1111_devices); i++) |
843 | if (has_devs & (1 << i)) | 843 | if (sa1111_devices[i].devid & has_devs) |
844 | sa1111_init_one_child(sachip, mem, &sa1111_devices[i]); | 844 | sa1111_init_one_child(sachip, mem, &sa1111_devices[i]); |
845 | 845 | ||
846 | return 0; | 846 | return 0; |
@@ -1335,7 +1335,7 @@ static int sa1111_match(struct device *_dev, struct device_driver *_drv) | |||
1335 | struct sa1111_dev *dev = SA1111_DEV(_dev); | 1335 | struct sa1111_dev *dev = SA1111_DEV(_dev); |
1336 | struct sa1111_driver *drv = SA1111_DRV(_drv); | 1336 | struct sa1111_driver *drv = SA1111_DRV(_drv); |
1337 | 1337 | ||
1338 | return dev->devid == drv->devid; | 1338 | return dev->devid & drv->devid; |
1339 | } | 1339 | } |
1340 | 1340 | ||
1341 | static int sa1111_bus_suspend(struct device *dev, pm_message_t state) | 1341 | static int sa1111_bus_suspend(struct device *dev, pm_message_t state) |