public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Philip Richard Oberfichtner <pro@denx.de>
To: u-boot@lists.denx.de
Cc: hs@denx.de, sjg@chromium.org, trini@konsulko.com,
	Philip Richard Oberfichtner <pro@denx.de>
Subject: [PATCH v2 0/3] bootcount: Replace I2C legacy implementation by driver model
Date: Fri, 20 Oct 2023 11:02:24 +0200	[thread overview]
Message-ID: <20231020090227.16634-1-pro@denx.de> (raw)

The generic I2C bootcounter driver does not yet adhere to driver model.
This patchset intends to replace the legacy implementation.

There are currently no upstream boards using the driver, so it should be
safe to just remove it. For downstream users it should be straighforward to
switch to the new implementation.


Changes in v2:
- Improved device tree handling by replacing address property with phandle
- Addition of a generic i2c helper function

In v1 there has been some discussion on how to smoothly bind and probe the i2c
device. The hereby proposed solution may not fullfill all the requirements
stated there, but it is the only variant I actually got to work. Furthermore it
is not as concise as I would have liked it to be. Ideas on how to improve it
are welcome :)


Philip Richard Oberfichtner (3):
  bootcount: Remove legacy I2C driver
  i2c: Implement i2c_get_chip_by_phandle()
  bootcount: Add driver model I2C driver

 drivers/bootcount/Kconfig            |  34 ++++-----
 drivers/bootcount/Makefile           |   2 +-
 drivers/bootcount/bootcount_dm_i2c.c | 103 +++++++++++++++++++++++++++
 drivers/bootcount/bootcount_i2c.c    |  43 -----------
 drivers/i2c/i2c-uclass.c             |  75 +++++++++++++++++++
 include/i2c.h                        |  12 ++++
 6 files changed, 204 insertions(+), 65 deletions(-)
 create mode 100644 drivers/bootcount/bootcount_dm_i2c.c
 delete mode 100644 drivers/bootcount/bootcount_i2c.c

-- 
2.42.0


             reply	other threads:[~2023-10-20  9:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20  9:02 Philip Richard Oberfichtner [this message]
2023-10-20  9:02 ` [PATCH v2 1/3] bootcount: Remove legacy I2C driver Philip Richard Oberfichtner
2023-10-26  3:41   ` Heiko Schocher
2023-10-20  9:02 ` [PATCH v2 2/3] i2c: Implement i2c_get_chip_by_phandle() Philip Richard Oberfichtner
2023-10-26  3:43   ` Heiko Schocher
2023-10-20  9:02 ` [PATCH v2 3/3] bootcount: Add driver model I2C driver Philip Richard Oberfichtner
2023-10-26  3:44   ` Heiko Schocher
2023-10-30  5:17     ` Heiko Schocher
2023-10-31  7:44       ` Philip Oberfichtner

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=20231020090227.16634-1-pro@denx.de \
    --to=pro@denx.de \
    --cc=hs@denx.de \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox