Re: [PATCH RESEND] spi: spidev: Allow matching DT compatible strings from ACPI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 27, 2016 at 01:24:48PM +0100, Mark Brown wrote:
> On Mon, Jun 27, 2016 at 02:34:08PM +0300, Mika Westerberg wrote:
> 
> > Allow the same devices to be used in ACPI based systems if they provide
> > proper DT compatible string.
> 
> Please allow a reasonable time for review, especially for an invasive
> change like this which needs a bunch of research to figure out how
> sensible the infrastructure to shove DT into ACPI is.

Sure.

Can I ask your opinion regarding an alternative approach to this?

Instead of adding these "pseudo", Linux specific devices to DT or ACPI
to support raw SPI access, what if we amend spidev a bit:

  - Introduce CONFIG_SPI_SPIDEV_MASTER which is part of spidev.c
    and can be selected separately.

  - If that option is set we create /dev/spi-<bus_num> for each SPI
    master.

  - Introduce two new ioctls SPI_IOC_RD/WR_CS which allow setting
    of chip select.

The /dev/spi-0 then can be used analogous to /dev/i2c-0. You first need
to program wanted chip select using those new ioctls. Then you can use
the device as normal spidev (all existing file operations and ioctls
still work). You can pick another chip select as needed. If there is an
actual SPI device bound to a chip select, that cannot be used through
/dev/spi-0.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux