From: Ludovic Desroches <ludovic.desroches@microchip.com> To: Tudor Ambarus - M18064 <Tudor.Ambarus@microchip.com> Cc: "wsa@the-dreams.de" <wsa@the-dreams.de>, Nicolas Ferre - M43238 <Nicolas.Ferre@microchip.com>, "alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>, "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [RESEND PATCH 1/2] i2c: enable buses to save their clock frequency in adapter Date: Mon, 29 Oct 2018 15:49:18 +0100 [thread overview] Message-ID: <20181029144918.3iukhksa522xna2e@M43218.corp.atmel.com> (raw) In-Reply-To: <20181023092025.32463-2-tudor.ambarus@microchip.com> On Tue, Oct 23, 2018 at 11:20:39AM +0200, Tudor Ambarus - M18064 wrote: > The clock-frequency property is not mandatory for the i2c buses. If it's > not present in the device tree, the buses __usually__ assume it's 100kHZ > (see altera, at91, axxia, etc.). Broadcom uses a 375kHZ default > clock-frequency, so the default clock frequency varies from bus to bus. > > There are i2c clients that need to know the bus clock frequency in order to > compute their wake token (see atecc508a i2c client). > > The clock-frequency value has to be propagated to the i2c clients, otherwise, > if they will not find the i2c bus clock frequency in the device tree, they > will have to make their own assumption of the clock frequency. > > Spare the i2c clients of making wrong assumptions of the i2c bus clock > frequency and enable the buses to save their clock frequency in adapter. > > Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviwed-by: Ludovic Desroches <ludovic.desroches@microchip.com> > --- > include/linux/i2c.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/i2c.h b/include/linux/i2c.h > index 65b4eaed1d96..f238da204c49 100644 > --- a/include/linux/i2c.h > +++ b/include/linux/i2c.h > @@ -677,6 +677,7 @@ struct i2c_adapter { > struct rt_mutex bus_lock; > struct rt_mutex mux_lock; > > + u32 bus_freq_hz; > int timeout; /* in jiffies */ > int retries; > struct device dev; /* the adapter device */ > -- > 2.9.4 >
WARNING: multiple messages have this Message-ID (diff)
From: ludovic.desroches@microchip.com (Ludovic Desroches) To: linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH 1/2] i2c: enable buses to save their clock frequency in adapter Date: Mon, 29 Oct 2018 15:49:18 +0100 [thread overview] Message-ID: <20181029144918.3iukhksa522xna2e@M43218.corp.atmel.com> (raw) In-Reply-To: <20181023092025.32463-2-tudor.ambarus@microchip.com> On Tue, Oct 23, 2018 at 11:20:39AM +0200, Tudor Ambarus - M18064 wrote: > The clock-frequency property is not mandatory for the i2c buses. If it's > not present in the device tree, the buses __usually__ assume it's 100kHZ > (see altera, at91, axxia, etc.). Broadcom uses a 375kHZ default > clock-frequency, so the default clock frequency varies from bus to bus. > > There are i2c clients that need to know the bus clock frequency in order to > compute their wake token (see atecc508a i2c client). > > The clock-frequency value has to be propagated to the i2c clients, otherwise, > if they will not find the i2c bus clock frequency in the device tree, they > will have to make their own assumption of the clock frequency. > > Spare the i2c clients of making wrong assumptions of the i2c bus clock > frequency and enable the buses to save their clock frequency in adapter. > > Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviwed-by: Ludovic Desroches <ludovic.desroches@microchip.com> > --- > include/linux/i2c.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/i2c.h b/include/linux/i2c.h > index 65b4eaed1d96..f238da204c49 100644 > --- a/include/linux/i2c.h > +++ b/include/linux/i2c.h > @@ -677,6 +677,7 @@ struct i2c_adapter { > struct rt_mutex bus_lock; > struct rt_mutex mux_lock; > > + u32 bus_freq_hz; > int timeout; /* in jiffies */ > int retries; > struct device dev; /* the adapter device */ > -- > 2.9.4 >
next prev parent reply other threads:[~2018-10-29 14:49 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-23 9:20 [RESEND PATCH 0/2] i2c: enable buses to save their clock frequency in adapter Tudor.Ambarus 2018-10-23 9:20 ` Tudor.Ambarus at microchip.com 2018-10-23 9:20 ` Tudor.Ambarus 2018-10-23 9:20 ` [RESEND PATCH 1/2] " Tudor.Ambarus 2018-10-23 9:20 ` Tudor.Ambarus at microchip.com 2018-10-23 9:20 ` Tudor.Ambarus 2018-10-29 14:49 ` Ludovic Desroches [this message] 2018-10-29 14:49 ` Ludovic Desroches 2018-10-29 14:49 ` Ludovic Desroches 2018-10-23 9:20 ` [RESEND PATCH 2/2] i2c: at91: Save the bus " Tudor.Ambarus 2018-10-23 9:20 ` Tudor.Ambarus at microchip.com 2018-10-23 9:20 ` Tudor.Ambarus
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=20181029144918.3iukhksa522xna2e@M43218.corp.atmel.com \ --to=ludovic.desroches@microchip.com \ --cc=Nicolas.Ferre@microchip.com \ --cc=Tudor.Ambarus@microchip.com \ --cc=alexandre.belloni@bootlin.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-i2c@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --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: linkBe 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.