summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/hi655x-pmic.c
Commit message (Collapse)AuthorAgeFilesLines
* mfd: hi655x: Fix regmap area declared size for hi655xRafael David Tinoco2018-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://bugs.linaro.org/show_bug.cgi?id=3903 LTP Functional tests have caused a bad paging request when triggering the regmap_read_debugfs() logic of the device PMIC Hi6553 (reading regmap/f8000000.pmic/registers file during read_all test): Unable to handle kernel paging request at virtual address ffff0 [ffff00000984e000] pgd=0000000077ffe803, pud=0000000077ffd803,0 Internal error: Oops: 96000007 [#1] SMP ... Hardware name: HiKey Development Board (DT) ... Call trace: regmap_mmio_read8+0x24/0x40 regmap_mmio_read+0x48/0x70 _regmap_bus_reg_read+0x38/0x48 _regmap_read+0x68/0x170 regmap_read+0x50/0x78 regmap_read_debugfs+0x1a0/0x308 regmap_map_read_file+0x48/0x58 full_proxy_read+0x68/0x98 __vfs_read+0x48/0x80 vfs_read+0x94/0x150 SyS_read+0x6c/0xd8 el0_svc_naked+0x30/0x34 Code: aa1e03e0 d503201f f9400280 8b334000 (39400000) Investigations have showed that, when triggered by debugfs read() handler, the mmio regmap logic was reading a bigger (16k) register area than the one mapped by devm_ioremap_resource() during hi655x-pmic probe time (4k). This commit changes hi655x's max register, according to HW specs, to be the same as the one declared in the pmic device in hi6220's dts, fixing the issue. Cc: <stable@vger.kernel.org> #v4.9 #v4.14 #v4.16 #v4.17 Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi655x: Add the clock cell to provide WiFi and BluetoothDaniel Lezcano2017-04-271-1/+2
| | | | | | | | | | The hi655x is a PMIC with regulator but also provides a clock for the WiFi and the bluetooth which is missing in the current implementation. Add the clock cell so it can be used in the next patch via the dts. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi655x-pmic: Fix module autoload when registered via OFJavier Martinez Canillas2016-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/mfd/hi655x-pmic.ko | grep alias After this patch: $ modinfo drivers/mfd/hi655x-pmic.ko | grep alias alias: of:N*T*Chisilicon,hi655x-pmicC* alias: of:N*T*Chisilicon,hi655x-pmic Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi655x: Fix return value check in hi655x_pmic_probe()Wei Yongjun2016-06-291-5/+2
| | | | | | | | | | In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Also remove unneeded error handling of platform_get_resource(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi655x-pmic: Add powerkey device to hi655x PMIC driverJohn Stultz2016-06-291-5/+30
| | | | | | | Wire up the powerkey driver functionality for the hi655x PMIC. Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi655x-pmic: Rename some interrupt macro namesJohn Stultz2016-06-291-8/+8
| | | | | | | | | | | | Currently the hi655x-pmic driver has names for interrupt mask values, but not for the interrupt numbers themselves. So to allow for interrupt numbers to have sane names, rename the mask values with the _MASK postfix and use the existing names as the interrupt name Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi655x-pmic: Fixup issue with un-acked interruptsJohn Stultz2016-06-291-0/+1
| | | | | | | | | | | | | | While trying to get the powerkey to function, I found when pressing the key, I would get infinitely repeating interrupts. After digging around a bit, it seems we didn't set the ack_base value for the regmap irqchip logic, so nothing was acking the interrupt. This patch adds the ack_base, which seems to make things work. Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: hi655x: Add MFD driver for hi655xChen Feng2016-05-181-0/+162
Add PMIC MFD driver to support hisilicon hi665x. Signed-off-by: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Fei Wang <w.f@huawei.com> Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com> Reviewed-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
OpenPOWER on IntegriCloud