Linux-Serial Archive mirror
 help / color / mirror / Atom feed
From: Hugo Villeneuve <hugo@hugovil.com>
To: Hugo Villeneuve <hugo@hugovil.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	gregkh@linuxfoundation.org, jirislaby@kernel.org,
	peterz@infradead.org, mingo@kernel.org,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	andy.shevchenko@gmail.com,
	Hugo Villeneuve <hvilleneuve@dimonoff.com>
Subject: Re: [PATCH v4 3/5] serial: sc16is7xx: split into core and I2C/SPI parts (core)
Date: Tue, 30 Apr 2024 09:03:33 -0400	[thread overview]
Message-ID: <20240430090333.5c5f029553cabcdf699310cb@hugovil.com> (raw)
In-Reply-To: <20240423091410.28cb286b212789250b1485dd@hugovil.com>

On Tue, 23 Apr 2024 09:14:10 -0400
Hugo Villeneuve <hugo@hugovil.com> wrote:

> On Tue, 23 Apr 2024 12:01:23 +0200
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 
> > Hi Hugo,
> > 
> > On Tue, Apr 9, 2024 at 5:48 PM Hugo Villeneuve <hugo@hugovil.com> wrote:
> > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > >
> > > Split the common code from sc16is7xx driver and move the I2C and SPI bus
> > > parts into interface-specific source files.
> > >
> > > sc16is7xx becomes the core functions which can support multiple bus
> > > interfaces like I2C and SPI.
> > >
> > > No functional changes intended.
> > >
> > > Also simplify and improve Kconfig entries.
> > >   - Capitalize SPI keyword for consistency
> > >   - Display list of supported ICs each on a separate line (and aligned) to
> > >     facilitate locating a specific IC model
> > >   - Add Manufacturer name at start of description string
> > >   - Add UART keyword to description string
> > >
> > > Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> > > Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > 
> > Thanks for your patch, which is now commit d49216438139bca0
> > ("serial: sc16is7xx: split into core and I2C/SPI parts (core)")
> > in tty-next (next-20240415 and later).
> > 
> > > --- a/drivers/tty/serial/Kconfig
> > > +++ b/drivers/tty/serial/Kconfig
> > > @@ -1021,41 +1021,30 @@ config SERIAL_SCCNXP_CONSOLE
> > >           Support for console on SCCNXP serial ports.
> > >
> > >  config SERIAL_SC16IS7XX_CORE
> > > -       tristate
> > > -
> > > -config SERIAL_SC16IS7XX
> > > -       tristate "SC16IS7xx serial support"
> > > +       tristate "NXP SC16IS7xx UART support"
> > 
> > Hence this replaces SERIAL_SC16IS7XX_CORE by SERIAL_SC16IS7XX,
> > so arch/mips/configs/cu1??0-neo_defconfig needs to updated.
> 
> Hi Geert,
> yes you are right, sorry I missed that.
> 
> > 
> > >         select SERIAL_CORE
> > > -       depends on (SPI_MASTER && !I2C) || I2C
> > > +       select SERIAL_SC16IS7XX_SPI if SPI_MASTER
> > > +       select SERIAL_SC16IS7XX_I2C if I2C
> > 
> > So if SPI_MASTER or I2C is enabled, the corresponding SERIAL_SC16IS7XX_*
> > subdriver can no longer be disabled?  According to
> > https://lore.kernel.org/all/20240403123501.8ef5c99f65a40ca2c10f635a@hugovil.com/
> > you did want to support that?
> 
> Just to clarify, SPI subdriver will be disabled if
> SPI_MASTER is disabled, even if I2C is enabled, and vice versa.
> 
> It was not my original intention, V1 of the patch offered the
> possibility to enable/disable each subdriver individually, but Andy
> pointed out that was maybe not the standard/usual/recommended way of
> defining it, and to look into what other subsystems were doing,
> especially iio. After some research, I settled on this approach as a
> compromise.

Hi Andy and Geert,
if you are ok with what I explained, I will send a patch.

Hugo.


> 
> 
> Hugo.
> 
> > 
> > >         help
> > > -         This selects support for SC16IS7xx serial ports.
> > > -         Supported ICs are SC16IS740, SC16IS741, SC16IS750, SC16IS752,
> > > -         SC16IS760 and SC16IS762. Select supported buses using options below.
> > > +         Core driver for NXP SC16IS7xx UARTs.
> > > +         Supported ICs are:
> > > +
> > > +           SC16IS740
> > > +           SC16IS741
> > > +           SC16IS750
> > > +           SC16IS752
> > > +           SC16IS760
> > > +           SC16IS762
> > > +
> > > +         The driver supports both I2C and SPI interfaces.
> > >
> > >  config SERIAL_SC16IS7XX_I2C
> > > -       bool "SC16IS7xx for I2C interface"
> > > -       depends on SERIAL_SC16IS7XX
> > > -       depends on I2C
> > > -       select SERIAL_SC16IS7XX_CORE if SERIAL_SC16IS7XX
> > > -       select REGMAP_I2C if I2C
> > > -       default y
> > > -       help
> > > -         Enable SC16IS7xx driver on I2C bus,
> > > -         If required say y, and say n to i2c if not required,
> > > -         Enabled by default to support oldconfig.
> > > -         You must select at least one bus for the driver to be built.
> > > +       tristate
> > > +       select REGMAP_I2C
> > >
> > >  config SERIAL_SC16IS7XX_SPI
> > > -       bool "SC16IS7xx for spi interface"
> > > -       depends on SERIAL_SC16IS7XX
> > > -       depends on SPI_MASTER
> > > -       select SERIAL_SC16IS7XX_CORE if SERIAL_SC16IS7XX
> > > -       select REGMAP_SPI if SPI_MASTER
> > > -       help
> > > -         Enable SC16IS7xx driver on SPI bus,
> > > -         If required say y, and say n to spi if not required,
> > > -         This is additional support to existing driver.
> > > -         You must select at least one bus for the driver to be built.
> > > +       tristate
> > > +       select REGMAP_SPI
> > >
> > >  config SERIAL_TIMBERDALE
> > >         tristate "Support for timberdale UART"
> > 
> > Gr{oetje,eeting}s,
> > 
> >                         Geert
> > 
> > -- 
> > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> > 
> > In personal conversations with technical people, I call myself a hacker. But
> > when I'm talking to journalists I just say "programmer" or something like that.
> >                                 -- Linus Torvalds
> > 
> 
> 


-- 
Hugo Villeneuve

  reply	other threads:[~2024-04-30 13:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 15:42 [PATCH v4 0/5] serial: sc16is7xx: split into core and I2C/SPI parts Hugo Villeneuve
2024-04-09 15:42 ` [PATCH v4 1/5] serial: sc16is7xx: add proper sched.h include for sched_set_fifo() Hugo Villeneuve
2024-04-09 15:42 ` [PATCH v4 2/5] serial: sc16is7xx: unconditionally clear line bit in sc16is7xx_remove() Hugo Villeneuve
2024-04-09 15:42 ` [PATCH v4 3/5] serial: sc16is7xx: split into core and I2C/SPI parts (core) Hugo Villeneuve
2024-04-23 10:01   ` Geert Uytterhoeven
2024-04-23 10:02     ` Geert Uytterhoeven
2024-04-23 10:37       ` Andy Shevchenko
2024-04-23 13:15         ` Hugo Villeneuve
2024-04-23 10:36     ` Andy Shevchenko
2024-04-23 13:11       ` Geert Uytterhoeven
2024-04-23 15:34         ` Hugo Villeneuve
2024-05-23  7:33         ` Geert Uytterhoeven
2024-05-23 23:56           ` Hugo Villeneuve
2024-05-24  7:47             ` Geert Uytterhoeven
2024-04-23 13:14     ` Hugo Villeneuve
2024-04-30 13:03       ` Hugo Villeneuve [this message]
2024-04-09 15:42 ` [PATCH v4 4/5] serial: sc16is7xx: split into core and I2C/SPI parts (sc16is7xx_lines) Hugo Villeneuve
2024-04-09 15:42 ` [PATCH v4 5/5] serial: sc16is7xx: split into core and I2C/SPI parts (sc16is7xx_regcfg) Hugo Villeneuve

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240430090333.5c5f029553cabcdf699310cb@hugovil.com \
    --to=hugo@hugovil.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hvilleneuve@dimonoff.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).