[PATCH 10/10] iio: dac: add mcf54415 DAC
Arnd Bergmann
arnd at arndb.de
Mon May 4 10:27:14 PDT 2026
On Mon, May 4, 2026, at 19:16, Angelo Dureghello wrote:
> +static void mcf54415_dac_exit(void *data)
> +{
> + struct mcf54415_dac *info = data;
> + int val;
> +
> + val = readw(info->regs + MCF54415_DAC_CR);
> + val |= MCF54415_DAC_CR_PDN;
> + writew(val, info->regs + MCF54415_DAC_CR);
> +}
We've recently discussed changing the MMIO accessors on coldfire
to behave like all the other ones, which makes readw() and writew()
have an implicit byteswap. An additional driver means one more
place to change during the conversion. Maybe you can use the
new mcf_readw()/mcf_writew() helpers that Greg has started
introducing? Those will keep using native big-endian register
definitions.
Arnd
More information about the linux-arm-kernel
mailing list