Skip to contentSkip to conversation

do we need regmap-i2c in barebox?

DISCUSSION Antony Pavlov 2 participants 3 messages Nov 3, 2021

lore
Share & tools
lore
#0 lore raw

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?

Signature · 7 lines
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

Hello Antony,

Quoted 6 lines · Antony Pavlov

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?

Quoted 10 lines

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?

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

Hi Ahmad!

Quoted 6 lines · Ahmad Fatoum

Hello Antony,

Quoted 2 lines · Antony Pavlov

Hi!

Quoted 7 lines
Quoted 4 lines

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.

Signature · 7 lines
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox