From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Okan Sahin <okan.sahin@analog.com>
Cc: outreachy@lists.linux.dev, Lee Jones <lee@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Marcus Folkesson <marcus.folkesson@gmail.com>,
Manish Narani <manish.narani@xilinx.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
William Breathitt Gray <william.gray@linaro.org>,
Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>,
ChiYuan Huang <cy_huang@richtek.com>,
Ramona Bolboaca <ramona.bolboaca@analog.com>,
Caleb Connolly <caleb.connolly@linaro.org>,
Marcelo Schmitt <marcelo.schmitt1@gmail.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/5] staging: drivers: mfd: Add MAX77541/MAX77540 PMIC Support
Date: Wed, 7 Dec 2022 13:24:10 +0200 [thread overview]
Message-ID: <Y5B32hSYKYsYwzfr@smile.fi.intel.com> (raw)
In-Reply-To: <20221207090906.5896-2-okan.sahin@analog.com>
On Wed, Dec 07, 2022 at 12:08:40PM +0300, Okan Sahin wrote:
> This patch adds MFD driver for MAX77541/MAX77540 to enable its sub
> devices.
>
> The MAX77541 is a multi-function devices. It includes
> buck converter and ADC.
>
> The MAX77540 is a high-efficiency buck converter
> with two 3A switching phases.
>
> They have same regmap except for ADC part of MAX77541.
Same comment as per patch 2.
...
> + help
> + Say yes here to add support for Analog Devices
> + MAX77541 and MAX77540 Power Management ICs.
> + This driver provides common support for accessing the device;
> + additional drivers must be enabled in order to use the functionality
> + of the device.
Arbitrary line lengths.
...
> + return devm_mfd_add_devices(dev, -1, max77540_devs, ARRAY_SIZE(max77540_devs),
There is a definition for -1, use it.
> + NULL, 0, NULL);
...
> + return devm_mfd_add_devices(dev, -1, max77541_devs, ARRAY_SIZE(max77541_devs),
Ditto.
> + NULL, 0, NULL);
...
> + chip_id = to_i2c_driver(client->dev.driver)->id_table;
> + if (!chip_data) {
> + chip_data = (void *)i2c_match_id(chip_id, client)->driver_data;
> + }
We have a new helper for this.
...
> + return dev_err_probe(me->dev, PTR_ERR(me->regmap),
> + "Failed to allocate register map\n");
Wrong indentation.
...
> +
Redundant blank line.
> +module_i2c_driver(max77541_i2c_driver);
...
> +MODULE_VERSION("1.0");
Why?
...
Missing inclusions:
- bits.h
- types.h
Missing forward declarations for:
struct device
struct regmap
struct regmap_irq_chip_data
...
> +/* REGISTERS */
...
> +#define MAX77541_REGMAP_IRQ_REG(_mask) \
> + { .mask = (_mask), }
When {} are on one line, the trailing comma inside is not needed.
...
> +enum mx_range {
> + LOW_RANGE,
> + MID_RANGE,
> + HIGH_RANGE,
> + RESERVED
Is it terminator?
> +};
...
> +struct max77541_dev {
> + void *pdata;
Why do you need this?
> + struct device *dev;
Isn't it the same as dev inside regmap?
> + struct regmap_irq_chip_data *irq_data;
> + struct regmap_irq_chip_data *irq_buck;
> + struct regmap_irq_chip_data *irq_topsys;
> + struct regmap_irq_chip_data *irq_adc;
> + struct i2c_client *i2c;
Is this is really needed? Perhaps regmap below provides what you need, no?
> + struct regmap *regmap;
> +
> + u8 type;
> +};
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-12-07 11:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 9:08 [PATCH 0/5] staging: drivers: mfd: Add MAX77541 MFD and related device drivers Okan Sahin
2022-12-07 9:08 ` [PATCH 1/5] staging: drivers: mfd: Add MAX77541/MAX77540 PMIC Support Okan Sahin
2022-12-07 11:24 ` Andy Shevchenko [this message]
2022-12-11 12:36 ` Jonathan Cameron
2022-12-07 9:08 ` [PATCH 2/5] staging: dt-bindings: mfd: adi,max77541.yaml Add MAX77541 bindings Okan Sahin
2022-12-07 10:05 ` Krzysztof Kozlowski
2022-12-07 14:19 ` Rob Herring
2022-12-07 9:08 ` [PATCH 3/5] staging: drivers: regulator: Add MAX77541 Regulator Support Okan Sahin
2022-12-07 11:16 ` Andy Shevchenko
2022-12-11 12:48 ` Jonathan Cameron
2022-12-07 9:08 ` [PATCH 4/5] staging: dt-bindings: regulator: adi,max77541.yaml Add MAX77541 Regulator bindings Okan Sahin
2022-12-07 10:07 ` Krzysztof Kozlowski
2022-12-07 14:19 ` Rob Herring
2022-12-07 9:08 ` [PATCH 5/5] staging: drivers: iio: adc: Adc MAX77541 ADC Support Okan Sahin
2022-12-07 11:30 ` Andy Shevchenko
2022-12-11 13:01 ` Jonathan Cameron
2022-12-07 11:09 ` [PATCH 0/5] staging: drivers: mfd: Add MAX77541 MFD and related device drivers Andy Shevchenko
2022-12-11 12:20 ` Jonathan Cameron
2022-12-11 13:34 ` Andy Shevchenko
2022-12-11 14:07 ` Jonathan Cameron
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=Y5B32hSYKYsYwzfr@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=anand.ashok.dumbre@xilinx.com \
--cc=broonie@kernel.org \
--cc=caleb.connolly@linaro.org \
--cc=cy_huang@richtek.com \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manish.narani@xilinx.com \
--cc=marcelo.schmitt1@gmail.com \
--cc=marcus.folkesson@gmail.com \
--cc=okan.sahin@analog.com \
--cc=outreachy@lists.linux.dev \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=ramona.bolboaca@analog.com \
--cc=robh+dt@kernel.org \
--cc=william.gray@linaro.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