Correct warnings flagged by checkpatch. In particular, modify
the following:
- Use octal file permissions instead of symbolic.
- Add 'const' to type of struct of_device_id variables.
- Change variables of type 'unsigned' to 'unsigned int'.
- Restructure conditionals to avoid else after return.
- Correct minor whitespace inconsistencies.
- Replace strncmp() with strcmp().
- Replace a static length 1 array with a scalar variable.
- Update the GPIO_QPNP_PIN Kconfig entry to use the name
'Qualcomm Technologies, Inc.'
- Expand the description of the GPIO_QPNP_PIN_DEBUG config
option.
- Remove an unnecessary BUG_ON() call.
Change-Id: Ib1a49adf4668124020fed90108fed338d7ab2bd6
Signed-off-by: David Collins <collinsd@codeaurora.org>
qpnp_pin_debugfs_create() is going through all the child nodes
to create debugfs entries whereas the allocation for q_spec is
made only for available child nodes. This leads to a null pointer
access when CONFIG_GPIO_QPNP_PIN_DEBUG is selected in defconfig.
Fix it by using number of gpios available under each gpio chip
which was populated from the available child count already.
Change-Id: I17cbeeba158d34180763087103da4b03e01f7c90
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
GPIO_LV_MV subtype has different MODE_SEL mask with other existing
subtypes. Correct the MODE_SEL mask in qpnp_pin_get() function to
make sure it could get the correct status for LV_MV subtype GPIOs.
CRs-Fixed: 1081831
Change-Id: Ibeb5d34412d4333f9c7f21d2fc7df1d3b1d4e72e
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Memory is allocated for the number of available nodes while memory is
freed for the number of all nodes. The memory that is attempted to be
freed when the driver probe fails is out of bounds and leads to a crash.
Fix the looping condition to free the correct amount of allocated memory.
CRs-Fixed: 1006797
Change-Id: I331463e3de8e6ff874995b122aa7415a7da64b31
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Fix the incorrect mask/shift values specified for 'dtest-sel'
debugfs entry.
Also, add a special handling to enable/disable dtest-sel via
debugfs.
echo 0 > /d/qpnp_pin/pm8xxx_gpio/dtest-sel to disable DTEST
echo 1...4 > /d/qpnp_pin/pm8xxx_gpio/dtest-sel to enable and select DTEST
CRs-Fixed: 970023
Change-Id: I51e9af5d71bbf8b9b9023f6f3d747550e0fab0fa
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Change to using upstream spmi bus architecture. All the spmi devices,
marked by spmi-dev-container, become platform devices.
spmi-slave-container devices become spmi_devices each representing
a slave. The read/write functions use regmap api's instead of calls to
spmi_ext_register_read/write() implemented by the spmi bus. This
regmap is instantiated per slave.
The spmi bus helper functions like spmi_get_irq get changed to their
platform bus equivalents.
Change Kconfig files include
* Remove dependence on OF_SPMI, MSM_QPNP_INT
* There were few places where an earlier commit
dcc2aedc80746acee589e4b47d3e6adf5d3ec253
missed adding dependence on SPMI along with MSM_SPMI.
Fix them.
* Add depends on ARCH_MSM. ARCH_MSM is used for internal builds.
Change the nodes in DTSI files to confirm to the modified drivers.
Update their binding docs to drop spmi-dev-container and
spmi-slave-container;
Finally update defconfig to use upstream SPMI.
Change-Id: Ic85bff27c09c84b152cb38acbc3cadd05c0ec57a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This snapshot is taken as of msm-3.18 commit
9da4ddc (Merge "clk: msm: clock-gcc: Associate gfx rail
voting with gfx3d branch")
Change-Id: Idd2f467f1f1863a156d1757589dfe78158f0e43f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>