All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chunyan Zhang <zhang.lyra@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	DTML <devicetree@vger.kernel.org>,
	Baolin Wang <baolin.wang7@gmail.com>,
	Orson Zhai <orsonzhai@gmail.com>,
	Chunyan Zhang <chunyan.zhang@unisoc.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] regulator: Add Unisoc's SC2730 regulator driver
Date: Wed, 29 Sep 2021 16:20:37 +0800	[thread overview]
Message-ID: <CAAfSe-vM8iG1OtQeVR1CxQtpvA8kqSs3pJ78RQQOL7GcWcTwSw@mail.gmail.com> (raw)
In-Reply-To: <20210928113057.GJ4199@sirena.org.uk>

On Tue, 28 Sept 2021 at 19:31, Mark Brown <broonie@kernel.org> wrote:
>
> On Tue, Sep 28, 2021 at 03:36:08PM +0800, Chunyan Zhang wrote:
>
> > +++ b/drivers/regulator/sc2730-regulator.c
> > @@ -0,0 +1,502 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (C) 2018-2021 Unisoc Inc.
> > + */
>
> Please make the entire comment a C++ one so things look more
> intentional.

Ok.

>
> > +static int debugfs_enable_get(void *data, u64 *val)
> > +{
> > +     struct regulator_dev *rdev = data;
> > +
>
> > +static int debugfs_enable_set(void *data, u64 val)
> > +{
> > +     struct regulator_dev *rdev = data;
> > +
>
> > +static int debugfs_voltage_get(void *data, u64 *val)
> > +{
>
> > +static int debugfs_voltage_set(void *data, u64 val)
> > +{
>
> If these were to be implemented they should be in the core as there's
> nothing device specific about them (the read side is there), please
> remove them from the driver.

Ok.

>
> > +static const struct of_device_id sc2730_regulator_match[] = {
> > +     { .compatible = "sprd,sc2730-regulator" },
> > +     {},
> > +};
> > +MODULE_DEVICE_TABLE(of, sc2730_regulator_match);
>
> Since this is a part of a MFD I'd not expect it to have a compatible
> string?

Since we switched to use devm_of_platform_populate() [1] to register
MFD subdevices, compatible is required, IIUC.

[1] https://elixir.bootlin.com/linux/latest/source/drivers/mfd/sprd-sc27xx-spi.c#L199

Thanks for the review,
Chunyan

  reply	other threads:[~2021-09-29  8:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  7:36 [PATCH 1/2] regulator: Add Unisoc's SC2730 regulator driver Chunyan Zhang
2021-09-28  7:36 ` [PATCH 2/2] dt-bindings: regulator: Add bindings for Unisoc's SC2730 regulator Chunyan Zhang
2021-09-28  8:46   ` Chunyan Zhang
2021-10-06 20:32     ` Rob Herring
2021-09-28 11:30 ` [PATCH 1/2] regulator: Add Unisoc's SC2730 regulator driver Mark Brown
2021-09-29  8:20   ` Chunyan Zhang [this message]
2021-09-29 12:29     ` Mark Brown
2021-09-30  3:12       ` Chunyan Zhang
2021-09-30 12:05         ` Mark Brown

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=CAAfSe-vM8iG1OtQeVR1CxQtpvA8kqSs3pJ78RQQOL7GcWcTwSw@mail.gmail.com \
    --to=zhang.lyra@gmail.com \
    --cc=baolin.wang7@gmail.com \
    --cc=broonie@kernel.org \
    --cc=chunyan.zhang@unisoc.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.