[RFC,v2,0/3] mikroBUS driver for add-on boards
mbox series

Message ID 20200818124815.11029-1-vaishnav@beagleboard.org
Headers show
Series
  • mikroBUS driver for add-on boards
Related show

Message

Vaishnav M A Aug. 18, 2020, 12:48 p.m. UTC
Hi,

This Patch series is an update to the mikroBUS driver
RFC v1 Patch : https://lkml.org/lkml/2020/7/24/518 .
The mikrobus driver is updated to add mikrobus ports from device-tree
overlays, the debug interfaces for adding mikrobus ports through sysFS
is removed, and the driver considers the extended usage of mikrobus
port pins from their standard purposes.

change log:
        v2: support for adding mikroBUS ports from DT overlays,
        remove debug sysFS interface for adding mikrobus ports,
        consider extended pin usage/deviations from mikrobus standard
        specifications,
        use greybus CPort protocol enum instead of new protcol enums
        Fix cases of wrong indendation, ignoring return values, freeing
        allocated resources in case of errors and other style suggestions
        in v1 review.

Vaishnav M A (3):
  add mikrobus descriptors to greybus_manifest
  mikroBUS driver for add-on boards on mikrobus ports
  Add Device Tree Bindings for mikroBUS port

 .../bindings/misc/linux,mikrobus.txt          |  81 ++
 MAINTAINERS                                   |   6 +
 drivers/misc/Kconfig                          |   1 +
 drivers/misc/Makefile                         |   1 +
 drivers/misc/mikrobus/Kconfig                 |  16 +
 drivers/misc/mikrobus/Makefile                |   7 +
 drivers/misc/mikrobus/mikrobus_core.c         | 692 ++++++++++++++++++
 drivers/misc/mikrobus/mikrobus_core.h         | 191 +++++
 drivers/misc/mikrobus/mikrobus_manifest.c     | 444 +++++++++++
 drivers/misc/mikrobus/mikrobus_manifest.h     |  21 +
 drivers/misc/mikrobus/mikrobus_port.c         | 171 +++++
 include/linux/greybus/greybus_manifest.h      |  47 ++
 12 files changed, 1678 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/linux,mikrobus.txt
 create mode 100644 drivers/misc/mikrobus/Kconfig
 create mode 100644 drivers/misc/mikrobus/Makefile
 create mode 100644 drivers/misc/mikrobus/mikrobus_core.c
 create mode 100644 drivers/misc/mikrobus/mikrobus_core.h
 create mode 100644 drivers/misc/mikrobus/mikrobus_manifest.c
 create mode 100644 drivers/misc/mikrobus/mikrobus_manifest.h
 create mode 100644 drivers/misc/mikrobus/mikrobus_port.c

Comments

'Greg KH' Aug. 18, 2020, 3:24 p.m. UTC | #1
On Tue, Aug 18, 2020 at 06:18:12PM +0530, Vaishnav M A wrote:
> Hi,
> 
> This Patch series is an update to the mikroBUS driver
> RFC v1 Patch : https://lkml.org/lkml/2020/7/24/518 .

Please use lore.kernel.org for links, we have no idea if lkml.org will
be working tomorrow or not :)

> The mikrobus driver is updated to add mikrobus ports from device-tree
> overlays, the debug interfaces for adding mikrobus ports through sysFS
> is removed, and the driver considers the extended usage of mikrobus
> port pins from their standard purposes.

I don't know what "properties" and "device" mean with regards to things
here, any chance you can provide a patch to the greybus spec itself that
adds this information so we can better understand the reasoning here to
see if the kernel changes match up with the goals?

thanks,

greg k-h
Frank Rowand Aug. 18, 2020, 8:38 p.m. UTC | #2
Hi Vaishnav,

+me +devicetree

Please add these two recipients to future versions.

I will comment more after reading the first version and v2.

-Frank


On 2020-08-18 07:48, Vaishnav M A wrote:
> Hi,
> 
> This Patch series is an update to the mikroBUS driver
> RFC v1 Patch : https://lkml.org/lkml/2020/7/24/518 .
> The mikrobus driver is updated to add mikrobus ports from device-tree
> overlays, the debug interfaces for adding mikrobus ports through sysFS
> is removed, and the driver considers the extended usage of mikrobus
> port pins from their standard purposes.
> 
> change log:
>         v2: support for adding mikroBUS ports from DT overlays,
>         remove debug sysFS interface for adding mikrobus ports,
>         consider extended pin usage/deviations from mikrobus standard
>         specifications,
>         use greybus CPort protocol enum instead of new protcol enums
>         Fix cases of wrong indendation, ignoring return values, freeing
>         allocated resources in case of errors and other style suggestions
>         in v1 review.
> 
> Vaishnav M A (3):
>   add mikrobus descriptors to greybus_manifest
>   mikroBUS driver for add-on boards on mikrobus ports
>   Add Device Tree Bindings for mikroBUS port
> 
>  .../bindings/misc/linux,mikrobus.txt          |  81 ++
>  MAINTAINERS                                   |   6 +
>  drivers/misc/Kconfig                          |   1 +
>  drivers/misc/Makefile                         |   1 +
>  drivers/misc/mikrobus/Kconfig                 |  16 +
>  drivers/misc/mikrobus/Makefile                |   7 +
>  drivers/misc/mikrobus/mikrobus_core.c         | 692 ++++++++++++++++++
>  drivers/misc/mikrobus/mikrobus_core.h         | 191 +++++
>  drivers/misc/mikrobus/mikrobus_manifest.c     | 444 +++++++++++
>  drivers/misc/mikrobus/mikrobus_manifest.h     |  21 +
>  drivers/misc/mikrobus/mikrobus_port.c         | 171 +++++
>  include/linux/greybus/greybus_manifest.h      |  47 ++
>  12 files changed, 1678 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/misc/linux,mikrobus.txt
>  create mode 100644 drivers/misc/mikrobus/Kconfig
>  create mode 100644 drivers/misc/mikrobus/Makefile
>  create mode 100644 drivers/misc/mikrobus/mikrobus_core.c
>  create mode 100644 drivers/misc/mikrobus/mikrobus_core.h
>  create mode 100644 drivers/misc/mikrobus/mikrobus_manifest.c
>  create mode 100644 drivers/misc/mikrobus/mikrobus_manifest.h
>  create mode 100644 drivers/misc/mikrobus/mikrobus_port.c
>
Vaishnav M A Aug. 18, 2020, 9:52 p.m. UTC | #3
On Tue, Aug 18, 2020 at 8:54 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Tue, Aug 18, 2020 at 06:18:12PM +0530, Vaishnav M A wrote:
> > Hi,
> >
> > This Patch series is an update to the mikroBUS driver
> > RFC v1 Patch : https://lkml.org/lkml/2020/7/24/518 .
>
> Please use lore.kernel.org for links, we have no idea if lkml.org will
> be working tomorrow or not :)
>
Hi Greg,

Thanks, will use lore.kernel.org for the links, attaching the corresponding
link to the v1 RFC patch thread for reference:
https://lore.kernel.org/lkml/20200724120637.GA427284@vaishnav-VirtualBox/

> > The mikrobus driver is updated to add mikrobus ports from device-tree
> > overlays, the debug interfaces for adding mikrobus ports through sysFS
> > is removed, and the driver considers the extended usage of mikrobus
> > port pins from their standard purposes.
>
> I don't know what "properties" and "device" mean with regards to things
> here, any chance you can provide a patch to the greybus spec itself that
> adds this information so we can better understand the reasoning here to
> see if the kernel changes match up with the goals?
>
> thanks,
>
> greg k-h
Sure, I will add a patch to the greybus-spec to describe the new descriptors,
the property and device descriptors are introduced to add information
about the SPI/I2C/UART chip/sensor which is required by the corresponding
device drivers, With these descriptors, it will be possible to describe devices
on I2C, SPI, UART, etc. behind a greybus device so as to bind existing kernel
drivers to them, This is not what is currently being done within the mikroBUS
driver, now it tries to instantiate devices on actual I2C, SPI, UART from
describing manifests, but the ultimate goal is to describe the devices on
I2C/SPI/UART behind a greybus device, thus enabling to attach existing
kernel drivers to devices present in add-on boards attached to mikroBUS
ports added via greybus.

Shall I submit a pull request to https://github.com/projectara/greybus-spec
for the specs, is there a different official upstream to greybus-spec?

Thanks and Regards,
Vaishnav M A
Vaishnav M A Aug. 18, 2020, 9:56 p.m. UTC | #4
On Wed, Aug 19, 2020 at 2:08 AM Frank Rowand <frowand.list@gmail.com> wrote:
>
> Hi Vaishnav,
>
> +me +devicetree
>
> Please add these two recipients to future versions.
>
> I will comment more after reading the first version and v2.
>
> -Frank
>
Hi Frank,

Sorry, I missed to run get_maintainer.pl after making the changes
will add both recipients in future versions.

Thanks and Regards,
Vaishnav M A
>
> On 2020-08-18 07:48, Vaishnav M A wrote:
> > Hi,
> >
> > This Patch series is an update to the mikroBUS driver
> > RFC v1 Patch : https://lkml.org/lkml/2020/7/24/518 .
> > The mikrobus driver is updated to add mikrobus ports from device-tree
> > overlays, the debug interfaces for adding mikrobus ports through sysFS
> > is removed, and the driver considers the extended usage of mikrobus
> > port pins from their standard purposes.
> >
> > change log:
> >         v2: support for adding mikroBUS ports from DT overlays,
> >         remove debug sysFS interface for adding mikrobus ports,
> >         consider extended pin usage/deviations from mikrobus standard
> >         specifications,
> >         use greybus CPort protocol enum instead of new protcol enums
> >         Fix cases of wrong indendation, ignoring return values, freeing
> >         allocated resources in case of errors and other style suggestions
> >         in v1 review.
> >
> > Vaishnav M A (3):
> >   add mikrobus descriptors to greybus_manifest
> >   mikroBUS driver for add-on boards on mikrobus ports
> >   Add Device Tree Bindings for mikroBUS port
> >
> >  .../bindings/misc/linux,mikrobus.txt          |  81 ++
> >  MAINTAINERS                                   |   6 +
> >  drivers/misc/Kconfig                          |   1 +
> >  drivers/misc/Makefile                         |   1 +
> >  drivers/misc/mikrobus/Kconfig                 |  16 +
> >  drivers/misc/mikrobus/Makefile                |   7 +
> >  drivers/misc/mikrobus/mikrobus_core.c         | 692 ++++++++++++++++++
> >  drivers/misc/mikrobus/mikrobus_core.h         | 191 +++++
> >  drivers/misc/mikrobus/mikrobus_manifest.c     | 444 +++++++++++
> >  drivers/misc/mikrobus/mikrobus_manifest.h     |  21 +
> >  drivers/misc/mikrobus/mikrobus_port.c         | 171 +++++
> >  include/linux/greybus/greybus_manifest.h      |  47 ++
> >  12 files changed, 1678 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/misc/linux,mikrobus.txt
> >  create mode 100644 drivers/misc/mikrobus/Kconfig
> >  create mode 100644 drivers/misc/mikrobus/Makefile
> >  create mode 100644 drivers/misc/mikrobus/mikrobus_core.c
> >  create mode 100644 drivers/misc/mikrobus/mikrobus_core.h
> >  create mode 100644 drivers/misc/mikrobus/mikrobus_manifest.c
> >  create mode 100644 drivers/misc/mikrobus/mikrobus_manifest.h
> >  create mode 100644 drivers/misc/mikrobus/mikrobus_port.c
> >
>
'Greg KH' Aug. 19, 2020, 5:54 a.m. UTC | #5
On Wed, Aug 19, 2020 at 03:22:48AM +0530, Vaishnav M A wrote:
> On Tue, Aug 18, 2020 at 8:54 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Tue, Aug 18, 2020 at 06:18:12PM +0530, Vaishnav M A wrote:
> > > Hi,
> > >
> > > This Patch series is an update to the mikroBUS driver
> > > RFC v1 Patch : https://lkml.org/lkml/2020/7/24/518 .
> >
> > Please use lore.kernel.org for links, we have no idea if lkml.org will
> > be working tomorrow or not :)
> >
> Hi Greg,
> 
> Thanks, will use lore.kernel.org for the links, attaching the corresponding
> link to the v1 RFC patch thread for reference:
> https://lore.kernel.org/lkml/20200724120637.GA427284@vaishnav-VirtualBox/
> 
> > > The mikrobus driver is updated to add mikrobus ports from device-tree
> > > overlays, the debug interfaces for adding mikrobus ports through sysFS
> > > is removed, and the driver considers the extended usage of mikrobus
> > > port pins from their standard purposes.
> >
> > I don't know what "properties" and "device" mean with regards to things
> > here, any chance you can provide a patch to the greybus spec itself that
> > adds this information so we can better understand the reasoning here to
> > see if the kernel changes match up with the goals?
> >
> > thanks,
> >
> > greg k-h
> Sure, I will add a patch to the greybus-spec to describe the new descriptors,
> the property and device descriptors are introduced to add information
> about the SPI/I2C/UART chip/sensor which is required by the corresponding
> device drivers, With these descriptors, it will be possible to describe devices
> on I2C, SPI, UART, etc. behind a greybus device so as to bind existing kernel
> drivers to them, This is not what is currently being done within the mikroBUS
> driver, now it tries to instantiate devices on actual I2C, SPI, UART from
> describing manifests, but the ultimate goal is to describe the devices on
> I2C/SPI/UART behind a greybus device, thus enabling to attach existing
> kernel drivers to devices present in add-on boards attached to mikroBUS
> ports added via greybus.
> 
> Shall I submit a pull request to https://github.com/projectara/greybus-spec
> for the specs, is there a different official upstream to greybus-spec?

That's a good place, but for now, you can submit it as part of your
patch series as well, so we can all see it and review it easier.

thanks,

greg k-h
Frank Rowand Aug. 25, 2020, 1:44 a.m. UTC | #6
Hi Vaishnav,

Apologies in advance -- I expect to be very slow in responding this
week.  Linux Plumbers will take some of my time and I am moving to
a new home.

-Frank


On 2020-08-18 15:38, Frank Rowand wrote:
> Hi Vaishnav,
> 
> +me +devicetree
> 
> Please add these two recipients to future versions.
> 
> I will comment more after reading the first version and v2.
> 
> -Frank
> 
> 
> On 2020-08-18 07:48, Vaishnav M A wrote:
>> Hi,
>>
>> This Patch series is an update to the mikroBUS driver
>> RFC v1 Patch : https://lkml.org/lkml/2020/7/24/518 .
>> The mikrobus driver is updated to add mikrobus ports from device-tree
>> overlays, the debug interfaces for adding mikrobus ports through sysFS
>> is removed, and the driver considers the extended usage of mikrobus
>> port pins from their standard purposes.
>>
>> change log:
>>         v2: support for adding mikroBUS ports from DT overlays,
>>         remove debug sysFS interface for adding mikrobus ports,
>>         consider extended pin usage/deviations from mikrobus standard
>>         specifications,
>>         use greybus CPort protocol enum instead of new protcol enums
>>         Fix cases of wrong indendation, ignoring return values, freeing
>>         allocated resources in case of errors and other style suggestions
>>         in v1 review.
>>
>> Vaishnav M A (3):
>>   add mikrobus descriptors to greybus_manifest
>>   mikroBUS driver for add-on boards on mikrobus ports
>>   Add Device Tree Bindings for mikroBUS port
>>
>>  .../bindings/misc/linux,mikrobus.txt          |  81 ++
>>  MAINTAINERS                                   |   6 +
>>  drivers/misc/Kconfig                          |   1 +
>>  drivers/misc/Makefile                         |   1 +
>>  drivers/misc/mikrobus/Kconfig                 |  16 +
>>  drivers/misc/mikrobus/Makefile                |   7 +
>>  drivers/misc/mikrobus/mikrobus_core.c         | 692 ++++++++++++++++++
>>  drivers/misc/mikrobus/mikrobus_core.h         | 191 +++++
>>  drivers/misc/mikrobus/mikrobus_manifest.c     | 444 +++++++++++
>>  drivers/misc/mikrobus/mikrobus_manifest.h     |  21 +
>>  drivers/misc/mikrobus/mikrobus_port.c         | 171 +++++
>>  include/linux/greybus/greybus_manifest.h      |  47 ++
>>  12 files changed, 1678 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/misc/linux,mikrobus.txt
>>  create mode 100644 drivers/misc/mikrobus/Kconfig
>>  create mode 100644 drivers/misc/mikrobus/Makefile
>>  create mode 100644 drivers/misc/mikrobus/mikrobus_core.c
>>  create mode 100644 drivers/misc/mikrobus/mikrobus_core.h
>>  create mode 100644 drivers/misc/mikrobus/mikrobus_manifest.c
>>  create mode 100644 drivers/misc/mikrobus/mikrobus_manifest.h
>>  create mode 100644 drivers/misc/mikrobus/mikrobus_port.c
>>
>