Message ID | 20160210153846.GB26950@x1 |
---|---|
State | New |
Headers | show |
On Wed, 10 Feb 2016, Laxman Dewangan wrote: > > On Wednesday 10 February 2016 09:08 PM, Lee Jones wrote: > >mfd: Provide MACRO to declare commonly defined MFD cell attributes > >Cc: Laxman Dewangan <ldewangan@nvidia.com> > >Signed-off-by: Lee Jones <lee.jones@linaro.org> > > Build passed with this patch when using it. > > Acked-by: Laxman Dewangan <ldewangan@nvidia.com> > > Please let me know if you applying this. I am going to use the macro > from this patch on max77620 series on next spin. As you are the first user, just submit it as 0/1 of your set. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
On Thu, 11 Feb 2016, Laxman Dewangan wrote: > > On Thursday 11 February 2016 02:40 PM, Lee Jones wrote: > >On Wed, 10 Feb 2016, Laxman Dewangan wrote: > > > >>On Wednesday 10 February 2016 09:08 PM, Lee Jones wrote: > >>>mfd: Provide MACRO to declare commonly defined MFD cell attributes > >>>Cc: Laxman Dewangan <ldewangan@nvidia.com> > >>>Signed-off-by: Lee Jones <lee.jones@linaro.org> > >>Build passed with this patch when using it. > >> > >>Acked-by: Laxman Dewangan <ldewangan@nvidia.com> > >> > >>Please let me know if you applying this. I am going to use the macro > >>from this patch on max77620 series on next spin. > >As you are the first user, just submit it as 0/1 of your set. > > > > I saw that it is merged and available in linux-next 20160211. > So it is fine to not submit this patch again and modify my patch > assuming it is on tree. I was going to handle that, but as you wish, either way is fine by me. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index bc6f7e0..1a5a87f 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h @@ -16,6 +16,32 @@ #include <linux/platform_device.h> +#define MFD_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) + +#define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match) \ + { \ + .name = (_name), \ + .resources = (_res), \ + .num_resources = MFD_ARRAY_SIZE((_res)), \ + .platform_data = (_pdata), \ + .pdata_size = MFD_ARRAY_SIZE((_pdata)), \ + .of_compatible = (_compat), \ + .acpi_match = (_match), \ + .id = _id, \ + } + +#define OF_MFD_CELL(_name, _res, _pdata, _id, _compat) \ + MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, NULL) \ + +#define ACPI_MFD_CELL(_name, _res, _pdata, _id, _match) \ + MFD_CELL_ALL(_name, _res, _pdata, _id, NULL, _match) \ + +#define MFD_CELL_BASIC(_name, _res, _pdata, _id) \ + MFD_CELL_ALL(_name, _res, _pdata, _id, NULL, NULL) \ + +#define MFD_CELL_NAME(_name) \ + MFD_CELL_ALL(_name, NULL, NULL, 0, NULL, NULL) \ + struct irq_domain; struct property_set;
mfd: Provide MACRO to declare commonly defined MFD cell attributes Cc: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> --- include/linux/mfd/core.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)