lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YjGR3i5W4HAZfsc0@google.com>
Date:   Wed, 16 Mar 2022 07:29:34 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     Frank Zago <frank@...o.net>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Wolfram Sang <wsa@...nel.org>, Johan Hovold <johan@...nel.org>,
        linux-usb@...r.kernel.org, gunar@...orcht.net
Subject: Re: [PATCH v3] mfd: ch341: add driver for the WCH CH341 in I2C/GPIO
 mode

On Tue, 15 Mar 2022, Frank Zago wrote:

> Hello Lee,
> 
> >> Changes from v2:
> >>   - bug fixes
> >>   - more robust USB enumeration
> >>   - Changed to an MFD driver as suggested
> > 
> > Perhaps you should have engaged with me before potentially wasting
> > your valuable time.
> > 
> > MFD is designed to take a parent platform driver and split it out into
> > various sub-systems.  If you don't use the MFD Core API (which is the
> > case here) it is not an MFD.  MFD is not a dumping ground for
> > collections of random device drivers.
> > 
> > I have no problem with you placing registration and core code inside
> > MFD (that *is* what it was designed for), but the leaf 'functionality'
> > should be placed in more appropriate locations.
> > 
> > I2C  => drivers/i2c
> > SPI  => drivers/spi
> > GPIO => drivers/gpio (or perhaps drivers/pinctrl)
> > USB  => drivers/usb
> > UART => drivers/tty/serial
> > 
> > Etc ... Find places for everything.
> > 
> > Anything left over, give to Greg (drivers/misc). :)
> > 
> 
> AFAICS that works if the driver is built-in, but not as a module. 

How did you reach that conclusion?

I expect most of the drivers in MFD and their children to be modules.

  `git grep module_.*_driver -- drivers/mfd/`

> I'd prefer that driver to be a module if desired, and have all its files in the same
> place instead of scattered in various directories.

The design and organisation of the kernel does not work like that.

> I can try drivers/misc if it's a better place.

I suspect you'll receive the same advice from Greg and Arnd.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ