The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	Matti Vaittinen <matti.vaittinen@linux.dev>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney@redhat.com>,
	Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-rtc@vger.kernel.org
Subject: Re: [PATCH 3/8] mfd: Support for ROHM BD73800 PMIC core
Date: Thu, 9 Jul 2026 11:48:39 +0100	[thread overview]
Message-ID: <20260709104839.GG2045740@google.com> (raw)
In-Reply-To: <043fc930caca4c436651e8fa77a1ae16a26d0a98.1782909323.git.mazziesaccount@gmail.com>

/* Sashiko Automation: Reviewed (0 Findings) */

On Wed, 01 Jul 2026, Matti Vaittinen wrote:

> From: Matti Vaittinen <mazziesaccount@gmail.com>
> 
> The BD73800 integrates regulators, ADC (intended for accumulating current /
> voltage / power values), a real-time clock (RTC), clock gate and GPIOs.
> 
> Add core support for ROHM BD73800 Power Management IC.
> 
> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
> ---
>  drivers/mfd/Kconfig              |  15 +-
>  drivers/mfd/rohm-bd71828.c       | 145 ++++++++++++++-
>  include/linux/mfd/rohm-bd73800.h | 307 +++++++++++++++++++++++++++++++
>  include/linux/mfd/rohm-generic.h |   1 +
>  4 files changed, 461 insertions(+), 7 deletions(-)
>  create mode 100644 include/linux/mfd/rohm-bd73800.h
> 
> diff --git a/drivers/mfd/rohm-bd71828.c b/drivers/mfd/rohm-bd71828.c
> index a79f354bf5cb..31637777b627 100644
> --- a/drivers/mfd/rohm-bd71828.c
> +++ b/drivers/mfd/rohm-bd71828.c
> @@ -2,7 +2,7 @@
>  /*
>   * Copyright (C) 2019 ROHM Semiconductors
>   *

You should consider updating this.

> - * ROHM BD718[15/28/79] and BD72720 PMIC driver
> + * ROHM BD718[15/28/79], BD72720 and BD73[8/9]00 PMIC driver
>   */
>  
>  #include <linux/gpio_keys.h>
> @@ -249,6 +256,17 @@ static const struct mfd_cell bd72720_mfd_cells[] = {
>  	},
>  };
>  
> +static const struct mfd_cell bd73800_mfd_cells[] = {
> +	{ .name = "bd73800-pmic", },
> +	{ .name = "bd73800-clk", },
> +	{ .name = "bd73800-gpio", },
> +	{
> +		.name = "bd73800-rtc",
> +		.num_resources = ARRAY_SIZE(bd73800_rtc_irqs),
> +		.resources = &bd73800_rtc_irqs[0],
> +	},
> +};

'bd73800_rtc_irqs'?

> +
>  static const struct regmap_range bd71815_volatile_ranges[] = {
>  	regmap_reg_range(BD71815_REG_SEC, BD71815_REG_YEAR),
>  	regmap_reg_range(BD71815_REG_CONF, BD71815_REG_BAT_TEMP),
> @@ -383,6 +412,24 @@ static const struct regmap_access_table bd72720_volatile_regs_4c = {
>  	.n_yes_ranges = ARRAY_SIZE(bd72720_volatile_ranges_4c),
>  };
>  
> +static const struct regmap_access_table bd73800_volatile_regs = {
> +	.yes_ranges = &bd73800_volatile_ranges[0],

'bd73800_volatile_ranges'?

> +	.n_yes_ranges = ARRAY_SIZE(bd73800_volatile_ranges),
> +};
> +
> +static const struct regmap_range bd73800_read_only_ranges[] = {
> +	regmap_reg_range(BD73800_REG_PRODUCT_ID, BD73800_REG_NVMVERSION),
> +	regmap_reg_range(BD73800_REG_POW_STATE, BD73800_REG_POW_STATE),
> +	regmap_reg_range(BD73800_REG_ADC_ACCUM_CNT2, BD73800_REG_ADC_TEMP_VAL0),
> +	regmap_reg_range(BD73800_REG_INT_MAIN_STAT, BD73800_REG_INT_MAIN_STAT),
> +	regmap_reg_range(BD73800_REG_INT_MAIN_SRC, BD73800_REG_INT_5_SRC),
> +};
> +
> +static const struct regmap_access_table bd73800_ro_regs = {
> +	.no_ranges = &bd73800_read_only_ranges[0],

Etc.

> +	.n_no_ranges = ARRAY_SIZE(bd73800_read_only_ranges),
> +};
> +
>  static const struct regmap_config bd71815_regmap = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
> @@ -852,6 +962,25 @@ static const struct regmap_irq_chip bd72720_irq_chip = {
>  	.irq_reg_stride = 1,
>  };
>  
> +static const struct regmap_irq_chip bd73800_irq_chip = {
> +	.name = "bd73800_irq",
> +	.main_status = BD73800_REG_INT_MAIN_STAT,
> +	.irqs = &bd73800_irqs[0],

Here too.

> +	.num_irqs = ARRAY_SIZE(bd73800_irqs),
> +	.status_base = BD73800_REG_INT_1_STAT,
> +	.unmask_base = BD73800_REG_INT_1_EN,
> +	.ack_base = BD73800_REG_INT_1_STAT,
> +	.init_ack_masked = true,
> +	.num_regs = 5,
> +	.num_main_regs = 1,
> +	/*
> +	 * Ignore mirrored bits [7:5]. They are handled as part of normal INT_4
> +	 * handling.
> +	 */
> +	.num_main_status_bits = 5,
> +	.irq_reg_stride = 1,
> +};
> +
>  static int set_clk_mode(struct device *dev, struct regmap *regmap,
>  			int clkmode_reg)
>  {
> diff --git a/include/linux/mfd/rohm-bd73800.h b/include/linux/mfd/rohm-bd73800.h
> new file mode 100644
> index 000000000000..4bceb20ac6b1
> --- /dev/null
> +++ b/include/linux/mfd/rohm-bd73800.h
> @@ -0,0 +1,307 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/*
> + * Copyright 2024 ROHM Semiconductors.
> + *

This is new to use.  Please update this too.

> + * Author: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> + */
> +
> +#ifndef _MFD_BD73800_H
> +#define _MFD_BD73800_H
> +
> +#include <linux/regmap.h>
> +

  reply	other threads:[~2026-07-09 10:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 12:40 [PATCH 0/8] Support ROHM BD73800 Matti Vaittinen
2026-07-01 12:41 ` [PATCH 1/8] dt-bindings: regulator: ROHM BD73800 regulators Matti Vaittinen
2026-07-01 15:39   ` Rob Herring (Arm)
2026-07-01 19:25   ` Rob Herring
2026-07-02  4:45     ` Matti Vaittinen
2026-07-01 12:41 ` [PATCH 2/8] dt-bindings: mfd: ROHM BD73800 PMIC Matti Vaittinen
2026-07-02  8:05   ` Krzysztof Kozlowski
2026-07-02  8:25     ` Matti Vaittinen
2026-07-03 20:46   ` Linus Walleij
2026-07-01 12:41 ` [PATCH 3/8] mfd: Support for ROHM BD73800 PMIC core Matti Vaittinen
2026-07-09 10:48   ` Lee Jones [this message]
2026-07-01 12:42 ` [PATCH 4/8] rtc: bd70528: Support RTC on ROHM BD73800 Matti Vaittinen
2026-07-01 12:55   ` Alexandre Belloni
2026-07-01 12:42 ` [PATCH 5/8] regulator: bd71828: Support " Matti Vaittinen
2026-07-01 13:01   ` Mark Brown
2026-07-02  4:55     ` Matti Vaittinen
2026-07-01 12:43 ` [PATCH 6/8] clk: bd718x7: " Matti Vaittinen
2026-07-01 12:43 ` [PATCH 7/8] gpio: bd73800: Support ROHM BD73800 PMIC GPIOs Matti Vaittinen
2026-07-03 13:11   ` Bartosz Golaszewski
2026-07-01 12:43 ` [PATCH 8/8] MAINTAINERS: Add ROHM BD73800 PMIC files Matti Vaittinen

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=20260709104839.GG2045740@google.com \
    --to=lee@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bmasney@redhat.com \
    --cc=brgl@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linusw@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=matti.vaittinen@linux.dev \
    --cc=mazziesaccount@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    /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