Re: [PATCH 08/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]>
Hi Jonathan,

On 5/6/26 16:57, Jonathan Cameron wrote:
> On Mon, 04 May 2026 19:28:28 +0200
> "Arnd Bergmann" <[email protected]> wrote:
> 
>> On Mon, May 4, 2026, at 19:16, Angelo Dureghello wrote:
>>> @@ -94,8 +94,42 @@ static struct platform_device dspi_spi0_device = {  
>> ...
>>> +static struct resource dspi_dac1_resource[] = {
>>> +	[0] = {  
>>
>> This looks like the name has a copy-paste error: this is not
>> related to the 'dspi' controller at all but is just the dac, right?
>>
>>       Arnd
>>
> 
> https://sashiko.dev/#/patchset/20260504-wip-stmark2-dac-v1-0-874c36a4910d%40baylibre.com
> Has noted some more alongside this one.
> Seems unlikely a DAC has a bus number.
> 

that sashiko comment is not clear to me, maybe was related to the comment
i copy/pasted from dspi.

I have now fixed this as:

+static struct resource dac0_resource[] = {
+	DEFINE_RES_MEM(MCFDAC_BASE0, 0x100),
+};
+
+static struct platform_device dac0_device = {
+	.name = "mcf54415_dac",
+	.id = 0,
+	.num_resources = ARRAY_SIZE(dac0_resource),
+	.resource = dac0_resource,
+};
+
+static struct resource dac1_resource[] = {
+	DEFINE_RES_MEM(MCFDAC_BASE1, 0x100),
+};
+
+static struct platform_device dac1_device = {
+	.name = "mcf54415_dac",
+	.id = 1,
+	.num_resources = ARRAY_SIZE(dac1_resource),
+	.resource = dac1_resource,
+};
+
 static struct platform_device *stmark2_devices[] __initdata = {
 	&dspi_spi0_device,
+	&dac0_device,
+	&dac1_device,
 };

It should be fine for sashiko too.

Regards,
angelo

> Jonathan





-- Angelo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.