[PATCH v5 07/10] m68k: stmark2: add mcf5441x DAC platform devices
Angelo Dureghello <[email protected]>
| Newsgroups | org.kernel.vger.linux-m68k,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
From: Angelo Dureghello <[email protected]> Add mcf5441x DAC platform devices. Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Angelo Dureghello <[email protected]> --- Changes in v2: - fix copy-paste error on naming - use DEFINE_RES() Changes in v3: - simplified DACs as single resource entries in place of an array Changes in v5: - move include <linux/ioport.h> in previous patch - use predefined "mcfdac" clock/device names --- arch/m68k/coldfire/stmark2.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/m68k/coldfire/stmark2.c b/arch/m68k/coldfire/stmark2.c index 7eed6097f501..a6f9eb3a75d8 100644 --- a/arch/m68k/coldfire/stmark2.c +++ b/arch/m68k/coldfire/stmark2.c @@ -84,8 +84,28 @@ static struct platform_device dspi_spi0_device = { }, }; +static struct resource dac0_resource = DEFINE_RES_MEM(MCFDAC_BASE0, 0x100); + +static struct platform_device dac0_device = { + .name = "mcfdac", + .id = 0, + .num_resources = 1, + .resource = &dac0_resource, +}; + +static struct resource dac1_resource = DEFINE_RES_MEM(MCFDAC_BASE1, 0x100); + +static struct platform_device dac1_device = { + .name = "mcfdac", + .id = 1, + .num_resources = 1, + .resource = &dac1_resource, +}; + static struct platform_device *stmark2_devices[] __initdata = { &dspi_spi0_device, + &dac0_device, + &dac1_device, }; /* -- 2.54.0