mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* do we need regmap-i2c in barebox?
@ 2021-11-03 17:35 Antony Pavlov
  2021-11-03 17:39 ` Ahmad Fatoum
  0 siblings, 1 reply; 3+ messages in thread
From: Antony Pavlov @ 2021-11-03 17:35 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Hi!

I have made draft version of pcf85363 i2c rtc driver for barebox.
I used drivers/rtc/rtc-pcf85363.c from linux kernel as a prototype.
The linux driver uses REGMAP_I2C linux feature. Barebox has regmap
framework, but no special i2c regmap features.

In barebox source tree I have found drivers/mfd/stpmic1.c which
uses regmap for i2c device without REGMAP_I2C linux feature.
So I have just stolen i2c regmap code from stpmic1.c for pcf85363
driver. I'll send pcf85363 i2c rtc driver for barebox in a separate
message.

Is there any sense in porting drivers/base/regmap/regmap-i2c.c from
linux into barebox?

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: do we need regmap-i2c in barebox?
  2021-11-03 17:35 do we need regmap-i2c in barebox? Antony Pavlov
@ 2021-11-03 17:39 ` Ahmad Fatoum
  2021-11-03 17:54   ` Antony Pavlov
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2021-11-03 17:39 UTC (permalink / raw)
  To: Antony Pavlov, barebox

Hello Antony,

On 03.11.21 18:35, Antony Pavlov wrote:
> Hi!
> 
> I have made draft version of pcf85363 i2c rtc driver for barebox.
> I used drivers/rtc/rtc-pcf85363.c from linux kernel as a prototype.
> The linux driver uses REGMAP_I2C linux feature. Barebox has regmap
> framework, but no special i2c regmap features.

There is d827f61e149b ("regmap: implement regmap_init_i2c")
since barebox v2021.07.0. What extra functionality are you missing?

> 
> In barebox source tree I have found drivers/mfd/stpmic1.c which
> uses regmap for i2c device without REGMAP_I2C linux feature.
> So I have just stolen i2c regmap code from stpmic1.c for pcf85363
> driver. I'll send pcf85363 i2c rtc driver for barebox in a separate
> message.
> 
> Is there any sense in porting drivers/base/regmap/regmap-i2c.c from
> linux into barebox?
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: do we need regmap-i2c in barebox?
  2021-11-03 17:39 ` Ahmad Fatoum
@ 2021-11-03 17:54   ` Antony Pavlov
  0 siblings, 0 replies; 3+ messages in thread
From: Antony Pavlov @ 2021-11-03 17:54 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

Hi Ahmad!

On Wed, 3 Nov 2021 at 20:39, Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>
> Hello Antony,
>
> On 03.11.21 18:35, Antony Pavlov wrote:
> > Hi!
> >
> > I have made draft version of pcf85363 i2c rtc driver for barebox.
> > I used drivers/rtc/rtc-pcf85363.c from linux kernel as a prototype.
> > The linux driver uses REGMAP_I2C linux feature. Barebox has regmap
> > framework, but no special i2c regmap features.
>
> There is d827f61e149b ("regmap: implement regmap_init_i2c")
> since barebox v2021.07.0. What extra functionality are you missing?

Many thanks for pointing on d827f61e149b, I have missed it in the maillist!

At the moment I use v2021.06.0 as the base of my production branch.

I'll try to upgrade my pcf85363 driver to use regmap_init_i2c and test
it in a several days.

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-03 18:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 17:35 do we need regmap-i2c in barebox? Antony Pavlov
2021-11-03 17:39 ` Ahmad Fatoum
2021-11-03 17:54   ` Antony Pavlov

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git