diff mbox series

[v2,4/5] mfd: intel-m10-bmc: add n5010 variant

Message ID 20210625074213.654274-5-martin@geanix.com
State Superseded
Headers show
Series fpga/mfd/hwmon: Initial support for Silicom N5010 PAC | expand

Commit Message

Martin Hundebøll June 25, 2021, 7:42 a.m. UTC
From: Martin Hundebøll <mhu@silicom.dk>

 The m10-bmc is used on the Silicom N5010 PAC too, so add it to list of
 m10bmc types.

Signed-off-by: Martin Hundebøll <mhu@silicom.dk>
---

Changes since v1:
 * Patch split out to separate mfd changes

 drivers/mfd/intel-m10-bmc.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Xu Yilun June 28, 2021, 5:59 a.m. UTC | #1
It is good to me.

On Fri, Jun 25, 2021 at 09:42:12AM +0200, Martin Hundebøll wrote:
> From: Martin Hundebøll <mhu@silicom.dk>

> 

>  The m10-bmc is used on the Silicom N5010 PAC too, so add it to list of

>  m10bmc types.

> 

> Signed-off-by: Martin Hundebøll <mhu@silicom.dk>

> ---

> 

> Changes since v1:

>  * Patch split out to separate mfd changes

> 

>  drivers/mfd/intel-m10-bmc.c | 12 +++++++++++-

>  1 file changed, 11 insertions(+), 1 deletion(-)

> 

> diff --git a/drivers/mfd/intel-m10-bmc.c b/drivers/mfd/intel-m10-bmc.c

> index 1a9bfb7f48cd..8db3bcf5fccc 100644

> --- a/drivers/mfd/intel-m10-bmc.c

> +++ b/drivers/mfd/intel-m10-bmc.c

> @@ -15,7 +15,8 @@

>  

>  enum m10bmc_type {

>  	M10_N3000,

> -	M10_D5005

> +	M10_D5005,

> +	M10_N5010,

>  };

>  

>  static struct mfd_cell m10bmc_d5005_subdevs[] = {

> @@ -28,6 +29,10 @@ static struct mfd_cell m10bmc_pacn3000_subdevs[] = {

>  	{ .name = "n3000bmc-secure" },

>  };

>  

> +static struct mfd_cell m10bmc_n5010_subdevs[] = {

> +	{ .name = "n5010bmc-hwmon" },

> +};

> +

>  static const struct regmap_range m10bmc_regmap_range[] = {

>  	regmap_reg_range(M10BMC_LEGACY_BUILD_VER, M10BMC_LEGACY_BUILD_VER),

>  	regmap_reg_range(M10BMC_SYS_BASE, M10BMC_SYS_END),

> @@ -192,6 +197,10 @@ static int intel_m10_bmc_spi_probe(struct spi_device *spi)

>  		cells = m10bmc_d5005_subdevs;

>  		n_cell = ARRAY_SIZE(m10bmc_d5005_subdevs);

>  		break;

> +	case M10_N5010:

> +		cells = m10bmc_n5010_subdevs;

> +		n_cell = ARRAY_SIZE(m10bmc_n5010_subdevs);

> +		break;

>  	default:

>  		return -ENODEV;

>  	}

> @@ -207,6 +216,7 @@ static int intel_m10_bmc_spi_probe(struct spi_device *spi)

>  static const struct spi_device_id m10bmc_spi_id[] = {

>  	{ "m10-n3000", M10_N3000 },

>  	{ "m10-d5005", M10_D5005 },

> +	{ "m10-n5010", M10_N5010 },

>  	{ }

>  };

>  MODULE_DEVICE_TABLE(spi, m10bmc_spi_id);

> -- 

> 2.31.0
Lee Jones June 28, 2021, 10:33 a.m. UTC | #2
On Mon, 28 Jun 2021, Xu Yilun wrote:

> It is good to me.


Please provide a proper *-by tag:

  See the: 'Sign your work - the Developer's Certificate of Origin'
  section in Documentation/process/submitting-patches.rst

And please don't top post.

> On Fri, Jun 25, 2021 at 09:42:12AM +0200, Martin Hundebøll wrote:

> > From: Martin Hundebøll <mhu@silicom.dk>

> > 

> >  The m10-bmc is used on the Silicom N5010 PAC too, so add it to list of

> >  m10bmc types.

> > 

> > Signed-off-by: Martin Hundebøll <mhu@silicom.dk>

> > ---

> > 

> > Changes since v1:

> >  * Patch split out to separate mfd changes

> > 

> >  drivers/mfd/intel-m10-bmc.c | 12 +++++++++++-

> >  1 file changed, 11 insertions(+), 1 deletion(-)

> > 

> > diff --git a/drivers/mfd/intel-m10-bmc.c b/drivers/mfd/intel-m10-bmc.c

> > index 1a9bfb7f48cd..8db3bcf5fccc 100644

> > --- a/drivers/mfd/intel-m10-bmc.c

> > +++ b/drivers/mfd/intel-m10-bmc.c

> > @@ -15,7 +15,8 @@

> >  

> >  enum m10bmc_type {

> >  	M10_N3000,

> > -	M10_D5005

> > +	M10_D5005,

> > +	M10_N5010,

> >  };

> >  

> >  static struct mfd_cell m10bmc_d5005_subdevs[] = {

> > @@ -28,6 +29,10 @@ static struct mfd_cell m10bmc_pacn3000_subdevs[] = {

> >  	{ .name = "n3000bmc-secure" },

> >  };

> >  

> > +static struct mfd_cell m10bmc_n5010_subdevs[] = {

> > +	{ .name = "n5010bmc-hwmon" },

> > +};

> > +

> >  static const struct regmap_range m10bmc_regmap_range[] = {

> >  	regmap_reg_range(M10BMC_LEGACY_BUILD_VER, M10BMC_LEGACY_BUILD_VER),

> >  	regmap_reg_range(M10BMC_SYS_BASE, M10BMC_SYS_END),

> > @@ -192,6 +197,10 @@ static int intel_m10_bmc_spi_probe(struct spi_device *spi)

> >  		cells = m10bmc_d5005_subdevs;

> >  		n_cell = ARRAY_SIZE(m10bmc_d5005_subdevs);

> >  		break;

> > +	case M10_N5010:

> > +		cells = m10bmc_n5010_subdevs;

> > +		n_cell = ARRAY_SIZE(m10bmc_n5010_subdevs);

> > +		break;

> >  	default:

> >  		return -ENODEV;

> >  	}

> > @@ -207,6 +216,7 @@ static int intel_m10_bmc_spi_probe(struct spi_device *spi)

> >  static const struct spi_device_id m10bmc_spi_id[] = {

> >  	{ "m10-n3000", M10_N3000 },

> >  	{ "m10-d5005", M10_D5005 },

> > +	{ "m10-n5010", M10_N5010 },

> >  	{ }

> >  };

> >  MODULE_DEVICE_TABLE(spi, m10bmc_spi_id);


-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Xu Yilun June 29, 2021, 1:39 a.m. UTC | #3
On Fri, Jun 25, 2021 at 11:45:49AM -0700, Moritz Fischer wrote:
> On Fri, Jun 25, 2021 at 09:42:12AM +0200, Martin Hundebøll wrote:

> > From: Martin Hundebøll <mhu@silicom.dk>

> > 

> >  The m10-bmc is used on the Silicom N5010 PAC too, so add it to list of

> >  m10bmc types.

> > 

> > Signed-off-by: Martin Hundebøll <mhu@silicom.dk>

> Acked-by: Moritz Fischer <mdf@kernel.org>

Reviewed-by: Xu Yilun <yilun.xu@intel.com>


Thanks,
Yilun

> > ---

> > 

> > Changes since v1:

> >  * Patch split out to separate mfd changes

> > 

> >  drivers/mfd/intel-m10-bmc.c | 12 +++++++++++-

> >  1 file changed, 11 insertions(+), 1 deletion(-)

> > 

> > diff --git a/drivers/mfd/intel-m10-bmc.c b/drivers/mfd/intel-m10-bmc.c

> > index 1a9bfb7f48cd..8db3bcf5fccc 100644

> > --- a/drivers/mfd/intel-m10-bmc.c

> > +++ b/drivers/mfd/intel-m10-bmc.c

> > @@ -15,7 +15,8 @@

> >  

> >  enum m10bmc_type {

> >  	M10_N3000,

> > -	M10_D5005

> > +	M10_D5005,

> > +	M10_N5010,

> >  };

> >  

> >  static struct mfd_cell m10bmc_d5005_subdevs[] = {

> > @@ -28,6 +29,10 @@ static struct mfd_cell m10bmc_pacn3000_subdevs[] = {

> >  	{ .name = "n3000bmc-secure" },

> >  };

> >  

> > +static struct mfd_cell m10bmc_n5010_subdevs[] = {

> > +	{ .name = "n5010bmc-hwmon" },

> > +};

> > +

> >  static const struct regmap_range m10bmc_regmap_range[] = {

> >  	regmap_reg_range(M10BMC_LEGACY_BUILD_VER, M10BMC_LEGACY_BUILD_VER),

> >  	regmap_reg_range(M10BMC_SYS_BASE, M10BMC_SYS_END),

> > @@ -192,6 +197,10 @@ static int intel_m10_bmc_spi_probe(struct spi_device *spi)

> >  		cells = m10bmc_d5005_subdevs;

> >  		n_cell = ARRAY_SIZE(m10bmc_d5005_subdevs);

> >  		break;

> > +	case M10_N5010:

> > +		cells = m10bmc_n5010_subdevs;

> > +		n_cell = ARRAY_SIZE(m10bmc_n5010_subdevs);

> > +		break;

> >  	default:

> >  		return -ENODEV;

> >  	}

> > @@ -207,6 +216,7 @@ static int intel_m10_bmc_spi_probe(struct spi_device *spi)

> >  static const struct spi_device_id m10bmc_spi_id[] = {

> >  	{ "m10-n3000", M10_N3000 },

> >  	{ "m10-d5005", M10_D5005 },

> > +	{ "m10-n5010", M10_N5010 },

> >  	{ }

> >  };

> >  MODULE_DEVICE_TABLE(spi, m10bmc_spi_id);

> > -- 

> > 2.31.0

> >
Lee Jones June 30, 2021, 10:57 a.m. UTC | #4
On Fri, 25 Jun 2021, Martin Hundebøll wrote:

> From: Martin Hundebøll <mhu@silicom.dk>

> 

>  The m10-bmc is used on the Silicom N5010 PAC too, so add it to list of

>  m10bmc types.

> 

> Signed-off-by: Martin Hundebøll <mhu@silicom.dk>

> ---

> 

> Changes since v1:

>  * Patch split out to separate mfd changes

> 

>  drivers/mfd/intel-m10-bmc.c | 12 +++++++++++-

>  1 file changed, 11 insertions(+), 1 deletion(-)


For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
diff mbox series

Patch

diff --git a/drivers/mfd/intel-m10-bmc.c b/drivers/mfd/intel-m10-bmc.c
index 1a9bfb7f48cd..8db3bcf5fccc 100644
--- a/drivers/mfd/intel-m10-bmc.c
+++ b/drivers/mfd/intel-m10-bmc.c
@@ -15,7 +15,8 @@ 
 
 enum m10bmc_type {
 	M10_N3000,
-	M10_D5005
+	M10_D5005,
+	M10_N5010,
 };
 
 static struct mfd_cell m10bmc_d5005_subdevs[] = {
@@ -28,6 +29,10 @@  static struct mfd_cell m10bmc_pacn3000_subdevs[] = {
 	{ .name = "n3000bmc-secure" },
 };
 
+static struct mfd_cell m10bmc_n5010_subdevs[] = {
+	{ .name = "n5010bmc-hwmon" },
+};
+
 static const struct regmap_range m10bmc_regmap_range[] = {
 	regmap_reg_range(M10BMC_LEGACY_BUILD_VER, M10BMC_LEGACY_BUILD_VER),
 	regmap_reg_range(M10BMC_SYS_BASE, M10BMC_SYS_END),
@@ -192,6 +197,10 @@  static int intel_m10_bmc_spi_probe(struct spi_device *spi)
 		cells = m10bmc_d5005_subdevs;
 		n_cell = ARRAY_SIZE(m10bmc_d5005_subdevs);
 		break;
+	case M10_N5010:
+		cells = m10bmc_n5010_subdevs;
+		n_cell = ARRAY_SIZE(m10bmc_n5010_subdevs);
+		break;
 	default:
 		return -ENODEV;
 	}
@@ -207,6 +216,7 @@  static int intel_m10_bmc_spi_probe(struct spi_device *spi)
 static const struct spi_device_id m10bmc_spi_id[] = {
 	{ "m10-n3000", M10_N3000 },
 	{ "m10-d5005", M10_D5005 },
+	{ "m10-n5010", M10_N5010 },
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, m10bmc_spi_id);