From mboxrd@z Thu Jan 1 00:00:00 1970 From: lee.jones@linaro.org (Lee Jones) Date: Mon, 6 Jan 2014 10:20:04 +0000 Subject: [RFC 01/18] mfd: syscon: Consider platform data a regmap config name In-Reply-To: <20140106094808.GG23772@lee--X1> References: <1387815830-8794-1-git-send-email-pawel.moll@arm.com> <1387815830-8794-2-git-send-email-pawel.moll@arm.com> <20140106094808.GG23772@lee--X1> Message-ID: <20140106102004.GH23772@lee--X1> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, 06 Jan 2014, Lee Jones wrote: > > Use the device platform data as a regmap config > > name. This is particularly useful in the regmap > > debugfs when there is more than one syscon device > > registered, to distinguish the register blocks. > > > > Signed-off-by: Pawel Moll > > Cc: Samuel Ortiz > > Cc: Lee Jones > > --- > > drivers/mfd/syscon.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c > > index 71841f9..ea1770b 100644 > > --- a/drivers/mfd/syscon.c > > +++ b/drivers/mfd/syscon.c > > @@ -143,6 +143,7 @@ static int syscon_probe(struct platform_device *pdev) > > return -ENOMEM; > > > > syscon_regmap_config.max_register = res->end - res->start - 3; > > + syscon_regmap_config.name = dev_get_platdata(&pdev->dev); > > syscon->regmap = devm_regmap_init_mmio(dev, base, > > &syscon_regmap_config); > > if (IS_ERR(syscon->regmap)) { > > This smells a bit fishy to me. Can you point me to the piece of code > or patch where you set the platform_data pointer as a string? Scrap that, I see it. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog