summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/hi6421-pmic-core.c
Commit message (Collapse)AuthorAgeFilesLines
* mfd: Use device_get_match_data() in a bunch of driversRob Herring2023-11-011-6/+3
| | | | | | | | | | | Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231017203612.2701060-1-robh@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
* mfd: hi6421-pmic: Fix Wvoid-pointer-to-enum-cast warningKrzysztof Kozlowski2023-08-221-1/+1
| | | | | | | | | | | 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: hi6421-pmic-core.c:62:9: error: cast to smaller integer type 'enum hi6421_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230810095849.123321-4-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
* mfd: hi6421-pmic: Use devm_platform_get_and_ioremap_resource()Ye Xingchen2023-04-261-3/+1
| | | | | | | | | | Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/202302081733017704501@zte.com.cn
* mfd: Replace HTTP links with HTTPS onesAlexander A. Klimov2020-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner2019-06-191-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mfd: hi6421-pmic: Add support for HiSilicon Hi6421v530Guodong Xu2017-09-051-18/+52
| | | | | | | | | | | | | | | Add support for HiSilicon Hi6421v530 PMIC. Hi6421v530 communicates with main SoC via memory-mapped I/O. Hi6421v530 and Hi6421 are PMIC chips from the same vendor, HiSilicon, but at different revisions. They share the same memory-mapped I/O design. They differ in integrated devices, such as regulator details, LDO voltage points. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Signed-off-by: Wang Xiaoyin <hw.wangxiaoyin@hisilicon.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi6421-pmic: Update dev_err messagesGuodong Xu2017-09-051-3/+3
| | | | | | | | Update dev_err messages to make them more readable. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi6421-pmic: Change license text to shorter formGuodong Xu2017-09-051-11/+2
| | | | | | | | Change license text to a shorter form of GPLv2. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi6421-pmic: Use devm_mfd_add_devices() for mfd_device registrationLaxman Dewangan2016-04-191-10/+2
| | | | | | | | | | Use devm_mfd_add_devices() for MFD devices registration and get rid of .remove callback to remove MFD child-devices. This is done by managed device framework. CC: Guodong Xu <guodong.xu@linaro.org> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi6421-pmic: Fix module autoload for OF platform driverLuis de Bethencourt2015-10-261-0/+1
| | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: Constify of_device_id arrayFabian Frederick2015-03-261-1/+1
| | | | | | | | | of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi6421-pmic: Constify struct regmap_configKrzysztof Kozlowski2015-01-221-1/+1
| | | | | | | | The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: Add HI6421 PMIC Core driverGuodong Xu2014-09-261-0/+113
This adds driver to support HiSilicon Hi6421 PMIC. Hi6421 includes multi- functions, such as regulators, codec, ADCs, Coulomb counter, etc. This driver includes core APIs _only_. Drivers for individul components, like voltage regulators, are implemented in corresponding driver directories and files. Registers in Hi6421 are memory mapped, so using regmap-mmio API. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>