From 53d421d29c052baa2c3f8d861781adc5cbcebe57 Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Sat, 23 May 2020 18:08:58 +0100 Subject: ARM: OMAP2: Switch to use DEVICE_ATTR_RO() Move device attributes to DEVICE_ATTR_RO() as that would make things a lot more "obvious" what is happening over the existing __ATTR usage. Link: https://lore.kernel.org/r/20200523170859.50003-8-sudeep.holla@arm.com Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Acked-by: Tony Lindgren Signed-off-by: Sudeep Holla --- arch/arm/mach-omap2/id.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 188ea5258c99..37ac2d103548 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -775,15 +775,13 @@ static const char * __init omap_get_family(void) return kasprintf(GFP_KERNEL, "Unknown"); } -static ssize_t omap_get_type(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +type_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%s\n", omap_types[omap_type()]); } -static struct device_attribute omap_soc_attr = - __ATTR(type, S_IRUGO, omap_get_type, NULL); +static DEVICE_ATTR_RO(type); void __init omap_soc_device_init(void) { @@ -806,6 +804,6 @@ void __init omap_soc_device_init(void) } parent = soc_device_to_device(soc_dev); - device_create_file(parent, &omap_soc_attr); + device_create_file(parent, &dev_attr_type); } #endif /* CONFIG_SOC_BUS */ -- cgit v1.2.3 From 475d04b48b9e227e1be2396b1499bd36274be40a Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Sat, 23 May 2020 18:08:59 +0100 Subject: ARM: OMAP2: Use custom soc attribute group instead of device_create_file Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs entries") introduced custom soc attribute group in soc_device_attribute structure but there are no users treewide. While trying to understand the motivation and tried to use it, it was found lot of existing custom attributes can moved to use it instead of device_create_file. Though most of these never remove/cleanup the custom attribute as they never call soc_device_unregister, using these custom attribute group eliminate the need for any cleanup as the driver infrastructure will take care of that. Let us remove device_create_file and start using the custom attribute group in soc_device_attribute. Link: https://lore.kernel.org/r/20200523170859.50003-9-sudeep.holla@arm.com Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Acked-by: Tony Lindgren Signed-off-by: Sudeep Holla --- arch/arm/mach-omap2/id.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 37ac2d103548..1d119b974f5f 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -783,9 +783,15 @@ type_show(struct device *dev, struct device_attribute *attr, char *buf) static DEVICE_ATTR_RO(type); +static struct attribute *omap_soc_attrs[] = { + &dev_attr_type.attr, + NULL +}; + +ATTRIBUTE_GROUPS(omap_soc); + void __init omap_soc_device_init(void) { - struct device *parent; struct soc_device *soc_dev; struct soc_device_attribute *soc_dev_attr; @@ -796,14 +802,12 @@ void __init omap_soc_device_init(void) soc_dev_attr->machine = soc_name; soc_dev_attr->family = omap_get_family(); soc_dev_attr->revision = soc_rev; + soc_dev_attr->custom_attr_group = omap_soc_groups[0]; soc_dev = soc_device_register(soc_dev_attr); if (IS_ERR(soc_dev)) { kfree(soc_dev_attr); return; } - - parent = soc_device_to_device(soc_dev); - device_create_file(parent, &dev_attr_type); } #endif /* CONFIG_SOC_BUS */ -- cgit v1.2.3 From a24015fa8b89e4605a9c6581d56b48d991e2b66b Mon Sep 17 00:00:00 2001 From: Anson Huang Date: Fri, 26 Jun 2020 05:14:07 +0800 Subject: firmware: imx: Move i.MX SCU soc driver into imx firmware folder The i.MX SCU soc driver depends on SCU firmware driver, so it has to use platform driver model for proper defer probe operation, since it has no device binding in DT file, a simple platform device is created together inside the platform driver. To make it more clean, we can just move the entire SCU soc driver into imx firmware folder and initialized by i.MX SCU firmware driver. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo --- arch/arm64/configs/defconfig | 1 - 1 file changed, 1 deletion(-) (limited to 'arch') diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 883e8bace3ed..c99237ac10a4 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -850,7 +850,6 @@ CONFIG_OWL_PM_DOMAINS=y CONFIG_RASPBERRYPI_POWER=y CONFIG_FSL_DPAA=y CONFIG_FSL_MC_DPIO=y -CONFIG_IMX_SCU_SOC=y CONFIG_QCOM_AOSS_QMP=y CONFIG_QCOM_GENI_SE=y CONFIG_QCOM_RMTFS_MEM=m -- cgit v1.2.3 From 00067ca5331e81f609d0e1255d4807ba24488aad Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Tue, 21 Jul 2020 20:09:00 +0200 Subject: soc: samsung: exynos-regulator-coupler: Add simple voltage coupler for Exynos5800 Add a simple custom voltage regulator coupler for Exynos5800 SoCs, which require coupling between "vdd_arm" and "vdd_int" regulators. This coupler ensures that the voltage values don't go below the bootloader-selected operation point during the boot process until the clients set their constraints. It is achieved by assuming minimal voltage value equal to the current value if no constraints are set. This also ensures proper voltage balancing if any of the client driver is missing. The balancing code comes from the regulator/core.c with the additional logic for handling regulators without client constraints applied added. Link: https://lore.kernel.org/r/20200721180900.13844-5-krzk@kernel.org Signed-off-by: Marek Szyprowski Reviewed-by: Dmitry Osipenko Signed-off-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann --- arch/arm/mach-exynos/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 76838255b5fa..f185cd3d4c62 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -118,6 +118,7 @@ config SOC_EXYNOS5800 bool "Samsung EXYNOS5800" default y depends on SOC_EXYNOS5420 + select EXYNOS_REGULATOR_COUPLER config EXYNOS_MCPM bool -- cgit v1.2.3