fsi: Add new central chardev support
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 20 Jun 2018 05:22:52 +0000 (15:22 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 26 Jul 2018 23:57:23 +0000 (09:57 +1000)
commit0ab5fe5374743d5a279b1ff6297ef2c54d06cd5f
tree1a6de34d905cea266ea3e9dcf58298e302ec90f6
parent537052df223408b25bdd77dbb9bf40080f514d3c
fsi: Add new central chardev support

The various FSI devices (sbefifo, occ, scom, more to come)
currently use misc devices.

This is problematic as the minor device space for misc is
limited and there can be a lot of them. Also it limits our
ability to move them to a dedicated /dev/fsi directory or
to be smart about device naming and numbering.

It also means we have IDAs on every single of these drivers

This creates a common fsi "device_type" for the optional
/dev/fsi grouping and a dev_t allocator for all FSI devices.

"Legacy" devices get to use a backward compatible numbering
scheme (as long as chip id <16 and there's only one copy
of a given unit type per chip).

A single major number and a single IDA are shared for all
FSI devices.

This doesn't convert the FSI device drivers to use the new
scheme yet, they will be converted individually.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/fsi/Kconfig
drivers/fsi/fsi-core.c
include/linux/fsi.h