Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Sa, Nuno" <Nuno.Sa@analog.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [RFC PATCH 1/1] iio: dac: add support for ltc2688
Date: Fri, 12 Nov 2021 15:22:35 +0000	[thread overview]
Message-ID: <20211112152235.12fdcc49@jic23-huawei> (raw)
In-Reply-To: <PH0PR03MB636630C2C0C98896409F352999949@PH0PR03MB6366.namprd03.prod.outlook.com>


> >   
> > > > > +               chan->overrange = fwnode_property_read_bool(child,
> > > > > +                                                           "adi,overrange");  
> > > >
> > > > One line?  
> > >
> > > It will pass the 80 col limit. AFAIR, Jonathan prefers to keep it when it
> > > does not hurt readability...  
> > 
> > I believe it will increase readability being located on one line.  
> 
> I mean, this is perfectly aligned with the open "(", so it's a pretty
> normal pattern. Anyways, I'm more than happy to move this into a one
> liner and just use the 100 limit. But let's see what Jonathan has to say
> because I do not want to move back and forward...

Here it happens to be particularly ugly because of the short first parameter,
so I'm fine with a longer line for this one.


> > > > > +       st->regmap = devm_regmap_init(&spi->dev, NULL, st,  
> > > > &ltc2688_regmap_config);
> > > >
> > > > I'm wondering why it's not a regmap SPI?  
> > >
> > > The problem is on the read side... In the first transfer we write the  
> > command/register  
> > > to read, then we need to release the CS pin so that the device  
> > executes the command,  
> > > and only then we read the data. AFAIK, the regmap spi  
> > implementation won't work like  
> > > this. I think CS is kept asserted the whole time...  
> > 
> > I believe it's configurable, no? Like the cs_change flag somewhere.
> > Can you double check?  
> 
> Don't think we can... The read part just calls:
> https://elixir.bootlin.com/linux/latest/source/drivers/base/regmap/regmap-spi.c#L98
> and has no control over the spi transfer bits...

Feature to add then or a custom regmap_bus if you want to keep it in the driver.

J
> 
> - Nuno Sá


  reply	other threads:[~2021-11-12 15:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 11:00 [RFC PATCH 0/1] LTC2688 support Nuno Sá
2021-11-11 11:00 ` [RFC PATCH 1/1] iio: dac: add support for ltc2688 Nuno Sá
2021-11-11 13:49   ` Andy Shevchenko
2021-11-11 14:30     ` Sa, Nuno
2021-11-11 14:41       ` Andy Shevchenko
2021-11-11 15:24         ` Sa, Nuno
2021-11-12 15:22           ` Jonathan Cameron [this message]
2021-11-12 15:40             ` Sa, Nuno
2021-11-12 16:14 ` [RFC PATCH 0/1] LTC2688 support Jonathan Cameron
2021-11-15 10:28   ` Sa, Nuno
2021-11-21 12:17     ` Jonathan Cameron
2021-11-30 14:43       ` Sa, Nuno
2021-12-02 15:37         ` Sa, Nuno
2021-12-05 18:03           ` Jonathan Cameron
2021-12-06 11:07             ` Sa, Nuno
2021-12-06 13:09               ` Jonathan Cameron
2021-12-06 13:56                 ` Sa, Nuno
2021-12-05 18:00         ` Jonathan Cameron
2021-12-06 10:49           ` Sa, Nuno
2021-12-06 13:15             ` Jonathan Cameron
2021-12-06 13:42               ` Sa, Nuno

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=20211112152235.12fdcc49@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Nuno.Sa@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-iio@vger.kernel.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