All of lore.kernel.org
 help / color / mirror / Atom feed
From: Annaliese McDermond <nh6z@nh6z.net>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: stefan.wahren@i2se.com, f.fainelli@gmail.com,
	swarren@wwwdotorg.org, team@nwdigitalradio.com,
	Eric Anholt <eric@anholt.net>,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH v2] i2c: bcm2835: Model Divider in CCF
Date: Thu, 16 May 2019 18:55:48 -0700	[thread overview]
Message-ID: <2E6EDCD1-E0B1-4859-BD75-EF411D3D4C6B@nh6z.net> (raw)
In-Reply-To: <20190516075848.GA1033@kunai>

Wolfram --

Thank you very much for your response.

> On May 16, 2019, at 12:58 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> 
> Hi Annaliese,
> 
> On Wed, May 15, 2019 at 10:37:03PM -0700, Annaliese McDermond wrote:
>> I’m just following up on this since I haven’t heard anything since I submitted the
>> v2 patch a week ago.  Wolfram, does this look like a sane approach?  Stefan,
>> were my changes in v2 acceptable?
> 
> There is a bit of overhead involved, but conceptually it looks like an
> elegant solution to me. However, I am not an expert of CCF. Grepping
> through kernel sources, I don't see many clocks defined outside
> drivers/clk. So, I'd appreciate if we could get some ack/feedback from
> one of the CCF experts/maintainers.

I was also similarly nervous about a clock provider being outside of 
drivers/clk, especially since one of the instances of that I wrote.

When writing this, there was a certain logic to putting this inside of
clk-bcm2835.c instead.  Eric may like this approach better because there
will probably be more code reuse of some of the dividers he uses in that
driver.  

My concern was surrounding the cross pollenation of the i2c and
clock drivers to a certain extent.  You have to be able to set the
FEDL_SHIFT and REDL_SHIFT registers when you change the clock rate.
You can’t do it in the transfer function like was done before because
it requires a call to clk_get_rate() which can deadlock in the
conditions I encountered.  You’d have to move those calls to the
clk-bcm2835 driver instead.

My nervousness surrounding moving the code into the clock driver
rather than the i2c driver is that I don’t know how dependent they
are on one another.  Do we anticipate that there may be a use for
the i2c-bcm2835 driver without the clk-bcm2835 driver?  Asking the
question very well may be premature optimization for a condition
that may never exist.  I’m thinking maybe Eric has some more
insight into this?

The other minor issue is that it’s going to require a change to the
bcm2835 DT to change the clock pointer to the divider.

If it fits better in the clk-bcm2835 driver, I’m happy to submit a
patch that puts it there.  Just let me know and I can work on it.

--
Annaliese McDermond
nh6z@nh6z.net
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-05-17  1:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08  7:12 [PATCH v2] i2c: bcm2835: Model Divider in CCF Annaliese McDermond
2019-05-08  7:12 ` Annaliese McDermond
2019-05-16  5:37 ` Annaliese McDermond
2019-05-16  7:58   ` Wolfram Sang
2019-05-17  1:55     ` Annaliese McDermond [this message]
2019-05-27 19:15       ` Wolfram Sang
2019-05-27 20:00         ` Annaliese McDermond
2019-05-27 20:20           ` Wolfram Sang
2019-05-28 22:25           ` Eric Anholt
2019-05-16 10:59 ` Stefan Wahren
2019-05-16 10:59   ` Stefan Wahren
2019-05-28  7:52 ` Stefan Wahren
2019-05-28  7:52   ` Stefan Wahren
2019-05-29  3:01   ` Annaliese McDermond
2019-05-29  4:32     ` Annaliese McDermond

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=2E6EDCD1-E0B1-4859-BD75-EF411D3D4C6B@nh6z.net \
    --to=nh6z@nh6z.net \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=stefan.wahren@i2se.com \
    --cc=swarren@wwwdotorg.org \
    --cc=team@nwdigitalradio.com \
    --cc=wsa@the-dreams.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.