Simplify error checking code by replacing multiple ERR macros with a
call to PTR_ERR_OR_ZERO. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Linus Walleij
Cc: Bartosz Golaszewski
Cc: Chris Healy
Cc: linux-g...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers
: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Fabio Estevam
Cc: Guenter Roeck
Cc: Sebastian Reichel
Cc: linux-kernel@vger.kernel.org
Cc: linux...@vger.kernel.org
---
drivers/power/supply/Kconfig | 9 +
drivers/power/supply/Makefile| 1 +
drivers/power/supply
On Fri, Apr 26, 2019 at 7:43 AM Lucas Stach wrote:
>
> Hi Andrey,
>
> Am Mittwoch, den 17.04.2019, 01:44 -0700 schrieb Andrey Smirnov:
> > Add driver for Microchip UCS1002 Programmable USB Port Power
> > Controller with Charger Emulation. The driver exposed a power supp
s://lkml.org/lkml/2016/3/14/233
I probably won't change the version numbering of the series at this
point, but I'll definitely add the link above to the cover letter.
>
> Missatge de Andrey Smirnov del dia dc., 17
> d’abr. 2019 a les 10:46:
> >
> > Add d
On Fri, Apr 26, 2019 at 9:10 AM Guenter Roeck wrote:
>
> On Wed, Apr 17, 2019 at 01:44:56AM -0700, Andrey Smirnov wrote:
> > Add driver for Microchip UCS1002 Programmable USB Port Power
> > Controller with Charger Emulation. The driver exposed a power supply
> > device to
ent for a new device,
generating the next syslog entry
Both CONFIG_I2C_DEBUG_CORE and CONFIG_POWER_SUPPLY_DEBUG were reported
in https://bugs.freedesktop.org/show_bug.cgi?id=76886 but only former
seems to have been fixed. Drop debug prints as it was done in I2C
subsystem to resolve the issue.
Signed-of
Add devres wrapper for thermal_add_hwmon_sysfs() to simplify driver
code.
Signed-off-by: Andrey Smirnov
Reviewed-by: Daniel Lezcano
Tested-by: Lucas Stach
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Cc: linux
Convert driver to use regmap API, drop custom LE/BE IO helpers and
simplify bit manipulation using regmap_update_bits(). This also allows
us to convert some register initialization to use loops and adds
convenient debug access to TMU registers via debugfs.
Signed-off-by: Andrey Smirnov
Reviewed
Expose thermal readings as a HWMON device, so that it could be
accessed using lm-sensors.
Signed-off-by: Andrey Smirnov
Reviewed-by: Daniel Lezcano
Tested-by: Lucas Stach
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux
Convert driver to use devm_ioremap() to simplify memory deallocation
and error handling code. No functional change intended.
Signed-off-by: Andrey Smirnov
Reviewed-by: Daniel Lezcano
Tested-by: Lucas Stach
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus
sequently would be able to drop the "err_iomap" error path.
Signed-off-by: Andrey Smirnov
Reviewed-by: Daniel Lezcano
Tested-by: Lucas Stach
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Cc: linux...@
Before returning measured temperature data to upper layer we need to
make sure that the reading was marked as "valid" to avoid reporting
bogus data.
Signed-off-by: Andrey Smirnov
Reviewed-by: Daniel Lezcano
Tested-by: Lucas Stach
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Va
, for the sake of simplicity, change the code to
do just that.
Signed-off-by: Andrey Smirnov
Tested-by: Lucas Stach
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kerne
It's impossible to use this driver outside of Device Tree, so if the
probe function is called, the dev.of_node is guaranteed to not be NULL
and guarding against that is pointless. Drop it.
Signed-off-by: Andrey Smirnov
Acked-by: Daniel Lezcano
Tested-by: Lucas Stach
Cc: Chris Healy
Cc:
Struct thermal_zone_device reference stored as sensor's private data
isn't really used anywhere in the code. Drop it.
Signed-off-by: Andrey Smirnov
Acked-by: Daniel Lezcano
Tested-by: Lucas Stach
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Ang
Pass all necessary data to qoriq_tmu_register_tmu_zone() directly
instead of passing a paltform device and then deriving it. This is
done as a first step to simplify resource deallocation code.
Signed-off-by: Andrey Smirnov
Acked-by: Daniel Lezcano
Tested-by: Lucas Stach
Cc: Chris Healy
Cc
Now that driver is converted to use get_temp_id() instead of
get_temp() we no longer need per sensor data. Drop all of the code
related to it.
Signed-off-by: Andrey Smirnov
Tested-by: Lucas Stach
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie
Use a local "struct device *dev" for brevity. No functional change
intended.
Signed-off-by: Andrey Smirnov
Acked-by: Daniel Lezcano
Tested-by: Lucas Stach
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Everyone:
This series contains patches adding support for HWMON integration, bug
fixes and general improvements (hopefully) for TMU driver I made while
working on it on i.MX8MQ.
Feedback is welcome!
Thanks,
Andrey Smirnov
Changes since [v4]
- Collected Tested-by from Lucas
On Wed, Apr 17, 2019 at 7:35 PM Sebastian Reichel wrote:
>
> Hi,
>
> On Fri, Apr 05, 2019 at 12:30:20AM -0700, Andrey Smirnov wrote:
> > Fix a similar endless event loop as was done in commit 8dcf32175b4e
> > ("i2c: prevent endless uevent loop with CONFIG_I2C_DEBUG_
On Tue, Apr 16, 2019 at 10:09 AM Daniel Lezcano
wrote:
>
> On 13/04/2019 10:27, Andrey Smirnov wrote:
> > Tmu_get_temp will get called as a part of sensor registration via
> > devm_thermal_zone_of_sensor_register(). To prevent it from retruning
> > bogus data we need to
Everyone:
This small series adds a driver for UCS1002 Programmable USB Port
Power Controller with Charger Emulation. See [page] for product page
and [datasheet] for device dataseet. Hopefully each individual patch
is self explanatory.
Feedback is welcome!
Thanks,
Andrey Smirnov
[page] https
Add driver for Microchip UCS1002 Programmable USB Port Power
Controller with Charger Emulation. The driver exposed a power supply
device to control/monitor various parameter of the device as well as a
regulator to allow controlling VBUS line.
Signed-off-by: Andrey Smirnov
Cc: Chris Health
Cc
Add POWER_SUPPLY_HEALTH_OVERCURRENT constant in order to allow
singalling overcurrent condition via power supply health information.
Signed-off-by: Andrey Smirnov
Cc: Chris Health
Cc: Lucas Stach
Cc: Fabio Estevam
Cc: Guenter Roeck
Cc: Sebastian Reichel
Cc: linux-kernel@vger.kernel.org
Cc
Add bindings for Microchip UCS1002 Programmable USB Port Power
Controller with Charger Emulation.
Signed-off-by: Andrey Smirnov
Cc: Chris Health
Cc: Lucas Stach
Cc: Fabio Estevam
Cc: Guenter Roeck
Cc: Rob Herring
Cc: devicet...@vger.kernel.org
Cc: Sebastian Reichel
Cc: linux-kernel
ned-off-by: Andrey Smirnov
Suggested-by: Lucas Stach
Cc: Lorenzo Pieralisi
Cc: Bjorn Helgaas
Cc: Chris Healy
Cc: Lucas Stach
Cc: linux-kernel@vger.kernel.org
Cc: linux-...@vger.kernel.org
---
drivers/pci/controller/dwc/pci-imx6.c | 19 ++-
1 file changed, 2 insertions(+), 17
Both pcie-designware.c and pci-imx6.c contain custom definitions for
PHY debug registers R0/R1 and on top of that there's already a
definition for R0 in pcie-designware.h. Move all of the definitions to
pcie-designware.h. No functional change intended.
Signed-off-by: Andrey Smirnov
Review
Change error code from EINVAL to ETIMEDOUT in
imx6_pcie_wait_for_speed_change() since that error code seems more
appropriate.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Cc: Lorenzo Pieralisi
Cc: Bjorn Helgaas
Cc: Chris Healy
Cc: Lucas Stach
Cc: linux-kernel@vger.kernel.org
Cc
Simplify pcie_phy_poll_ack() by incorporating shifting into constant
definition and convert the code to use 'bool'. No functional change
intended.
Signed-off-by: Andrey Smirnov
Cc: Lorenzo Pieralisi
Cc: Bjorn Helgaas
Cc: Chris Healy
Cc: Lucas Stach
Cc: linux-kernel@vger.kernel.org
Avoid using explicit left shifts and convert various definitions to
use BIT() instead. No functional change intended.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Cc: Lorenzo Pieralisi
Cc: Bjorn Helgaas
Cc: Chris Healy
Cc: Lucas Stach
Cc: linux-kernel@vger.kernel.org
Cc: linux
PHY registers on i.MX6 are 16-bit wide, so we can get rid of explicit
masking if we restrict pcie_phy_read/pcie_phy_write to use 'u16'
instead of 'int'. No functional change intended.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Cc: Lorenzo Pieralisi
Cc: Bjor
Code using these constants was removed in commit a71280722eeb ("PCI:
imx6: Remove LTSSM disable workaround"). No functional change
intended.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Cc: Lorenzo Pieralisi
Cc: Bjorn Helgaas
Cc: Chris Healy
Cc: Lucas Stach
Cc: li
Make use of regmap_read_poll_timeout() to simplify
imx7d_pcie_wait_for_phy_pll_lock(). No functional change intended.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Cc: Lorenzo Pieralisi
Cc: Bjorn Helgaas
Cc: Chris Healy
Cc: Lucas Stach
Cc: linux-kernel@vger.kernel.org
Cc: linux
Simplify the code by incorporating left shifts into constant
defnitions as well as using FIELD_PREP/GENMASK. No functional change
intended.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Cc: Lorenzo Pieralisi
Cc: Bjorn Helgaas
Cc: Chris Healy
Cc: Lucas Stach
Cc: linux-kernel
imx6_pcie_enable_ref_clk() is never called in atomic context, so
there's no need to use udelay(). Replace it with usleep_range().
Signed-off-by: Andrey Smirnov
Cc: Lorenzo Pieralisi
Cc: Bjorn Helgaas
Cc: Chris Healy
Cc: Lucas Stach
Cc: linux-kernel@vger.kernel.org
Cc:
Now that driver data has flags variable that can be used to indicate
quirks/features supported we can switch the code to use it instead of
having a special function that does so based on variant alone. No
functional change intended.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Cc
ch is self-explanatory.
I tested this series on i.MX6Q, i.MX7D and i.MX8MQ.
Feedback is welcome!
Thanks,
Andrey Smirnov
Chagnes since [v3]:
- Collected Reviewed-by from Lucas for most of the patches
- Converted "PCI: imx6: Replace calls to udelay() with
usleep_range()"
On Fri, Apr 12, 2019 at 8:53 AM Lucas Stach wrote:
>
> Am Sonntag, den 31.03.2019, 21:25 -0700 schrieb Andrey Smirnov:
> > All calls to imx6_pcie_wait_for_link() share the same error path and
> > the state of PHY debug registers will already be printed there.
>
> With
On Fri, Apr 12, 2019 at 9:12 AM Lucas Stach wrote:
>
> Am Sonntag, den 31.03.2019, 21:25 -0700 schrieb Andrey Smirnov:
> > Simplify pcie_phy_poll_ack() by incorporating shifting into constant
> > definition and convert the code to use 'bool'. No functional chang
Specify CS as GPIO_ACTIVE_LOW in spi0 to fix the following warning:
m25p128@0 enforce active low on chipselect handle
Signed-off-by: Andrey Smirnov
Cc: Shawn Guo
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Fabio Estevam
Cc: linux-kernel@vger.kernel.org
---
arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
Since imx7d_adc_remove() does exactly the same thing as
imx7d_adc_suspend() we can use the latter together with
devm_add_action_or_reset() to simplify the former. Rename
imx7d_adc_suspend() to imx7d_adc_disable() for clarity while at it.
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc
Initialization sequence performed in imx7d_adc_resume() is exactly the
same as the one being done in imx7d_adc_probe(). Make use of the
former in the latter to avoid code duplication. Rename
imx7d_adc_resume() to imx7d_adc_enable() for clarity while at it.
Signed-off-by: Andrey Smirnov
Cc
Mark i2c0 SCL as GPIO_OPEN_DRAIN to fix the following warning:
gpio-36 (scl): enforced open drain please flag it properly in DT/ACPI
DSDT/board file
Signed-off-by: Andrey Smirnov
Cc: Shawn Guo
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Fabio Estevam
Cc: linux-kernel@vger.kernel.org
---
arch/arm
Replace combination of pr_err()/dev_name() with an equivalent call for
dev_err().
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc: Hartmut Knaack
Cc: Lars-Peter Clausen
Cc: Peter Meerwald-Stadler
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Use devm_platform_ioremap_resource() to be able to drop a bit of
explicit boilerplate code.
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc: Hartmut Knaack
Cc: Lars-Peter Clausen
Cc: Peter Meerwald-Stadler
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Everyone:
This series is a number of small improvements I made to i.MX7D ADC
driver. Hopefully each patch is self-explanatory.
Feedback is welcome!
Thanks,
Andrey Smirnov
Changes [v1]:
- Renamed imx7d_adc_resume() to imx7d_adc_enable()
- Renamed imx7d_adc_suspend() to
Use devm_iio_device_register() and drop imx7d_adc_remove().
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc: Hartmut Knaack
Cc: Lars-Peter Clausen
Cc: Peter Meerwald-Stadler
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/iio/adc/imx7d_adc.c
Use a local "struct device *dev" in imx7d_adc_probe() for brevity. No
functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc: Hartmut Knaack
Cc: Lars-Peter Clausen
Cc: Peter Meerwald-Stadler
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: li
Add #io-channel-cells to list of required properties. Needed to be
able to reference that node by phandle.
Signed-off-by: Andrey Smirnov
Cc: Shawn Guo
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Fabio Estevam
Cc: Rob Herring
Cc: linux-kernel@vger.kernel.org
Cc: devicet...@vger.kernel.org
Specify #io-channel-cells in ADC nodes. Needed to be able to reference
them by phandle.
Signed-off-by: Andrey Smirnov
Cc: Shawn Guo
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Fabio Estevam
Cc: Rob Herring
Cc: linux-kernel@vger.kernel.org
Cc: devicet...@vger.kernel.org
---
arch/arm/boot/dts
Add support for ZII's i.MX7 based Remote Peripheral Unit 2 (RPU2)
board.
Signed-off-by: Andrey Smirnov
Reviewed-by: Fabio Estevam
Cc: Shawn Guo
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Fabio Estevam
Cc: Rob Herring
Cc: linux-kernel@vger.kernel.org
Cc: devicet...@vger.kernel.org
---
Ch
Add support for ZII i.MX7 RPU2 board.
Signed-off-by: Andrey Smirnov
Reviewed-by: Rob Herring
Cc: Shawn Guo
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Fabio Estevam
Cc: Rob Herring
Cc: linux-kernel@vger.kernel.org
Cc: devicet...@vger.kernel.org
---
Documentation/devicetree/bindings/arm/fsl.yaml
On Sun, Apr 7, 2019 at 4:15 AM Jonathan Cameron wrote:
>
> On Wed, 3 Apr 2019 00:03:24 -0700
> Andrey Smirnov wrote:
>
> > Initialization sequence performed in imx7d_adc_resume() is exactley
> > the same as what's being done in imx7d_adc_probe(). Make use of th
On Sun, Apr 7, 2019 at 4:07 AM Jonathan Cameron wrote:
>
> On Wed, 3 Apr 2019 00:03:22 -0700
> Andrey Smirnov wrote:
>
> > Use devm_iio_device_register() and drop explicit call to
> > iio_device_unregister().
> >
> > Signed-off-by: Andrey Smirnov
>
Convert driver to use devm_ioremap() to simplify memory deallocation
and error handling code. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Cc: linux
Struct thermal_zone_device reference stored as sensor's private data
isn't really used anywhere in the code. Drop it.
Signed-off-by: Andrey Smirnov
Acked-by: Daniel Lezcano
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Now that driver is converted to use get_temp_id() instead of
get_temp() we no longer need per sensor data. Drop all of the code
related to it.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux
Pass all necessary data to qoriq_tmu_register_tmu_zone() directly
instead of passing a paltform device and then deriving it. This is
done as a first step to simplify resource deallocation code.
Signed-off-by: Andrey Smirnov
Acked-by: Daniel Lezcano
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo
Convert driver to use regmap API, drop custom LE/BE IO helpers and
simplify bit manipulation using regmap_update_bits(). This also allows
us to convert some register initialization to use loops and adds
convenient debug access to TMU registers via debugfs.
Signed-off-by: Andrey Smirnov
Cc: Chris
, for the sake of simplicity, change the code to
do just that.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/th
sequently would be able to drop the "err_iomap" error path.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel
Before returning measured temperature data to upper layer we need to
make sure that the reading was marked as "valid" to avoid reporting
bogus data.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Add devres wrapper for thermal_add_hwmon_sysfs() to simplify driver
code.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Expose thermal readings as a HWMON device, so that it could be
accessed using lm-sensors.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel
Use a local "struct device *dev" for brevity. No functional change
intended.
Signed-off-by: Andrey Smirnov
Acked-by: Daniel Lezcano
Cc: Chris Healy
Cc: Lucas Stach
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Cc: linux...@vger.ker
Everyone:
This series contains patches adding support for HWMON integration, bug
fixes and general improvements (hopefully) for TMU driver I made while
working on it on i.MX8MQ.
Feedback is welcome!
Thanks,
Andrey Smirnov
Changes since [v3]
- Series reabse on top of [rfc]
- Fixed
It's impossible to use this driver outside of Device Tree, so if the
probe function is called, the dev.of_node is guaranteed to not be NULL
and guarding against that is pointless. Drop it.
Signed-off-by: Andrey Smirnov
Acked-by: Daniel Lezcano
Cc: Chris Healy
Cc: Lucas Stach
Cc: Ed
ent with the registering function.
>
Tested both patches on i.MX8MQ, seem to work as expected.
Tested-by: Andrey Smirnov
Thanks,
Andrey Smirnov
On Thu, Apr 4, 2019 at 2:12 AM Daniel Lezcano wrote:
>
> On 01/04/2019 06:14, Andrey Smirnov wrote:
> > Expose thermal readings as a HWMON device, so that it could be
> > accessed using lm-sensors.
> >
> > Signed-off-by: Andrey Smirnov
> > Cc: Chris Healy
&g
On Thu, Apr 4, 2019 at 2:05 AM Daniel Lezcano wrote:
>
> On 01/04/2019 06:14, Andrey Smirnov wrote:
> > Before returning measured temperature data to upper layer we need to
> > make sure that the reading was marked as "valid" to avoid reporting
> > bogus data.
&
On Thu, Apr 4, 2019 at 1:47 AM Daniel Lezcano wrote:
>
> On 01/04/2019 06:14, Andrey Smirnov wrote:
> > Convert driver to use regmap API, drop custom LE/BE IO helpers and
> > simplify bit manipulation using regmap_update_bits(). This also allows
> > us to convert some re
On Thu, Apr 4, 2019 at 1:23 AM Daniel Lezcano wrote:
>
> On 01/04/2019 06:14, Andrey Smirnov wrote:
> > Convert driver to use devm_ioremap() to simplify memory deallocation
> > and error handling code. No functional change intended.
> >
> > Signed-off-by: Andre
On Thu, Apr 4, 2019 at 1:12 AM Daniel Lezcano wrote:
>
> On 01/04/2019 06:14, Andrey Smirnov wrote:
> > We can simplify error cleanup code if instead of passing a "struct
> > platform_device *" to qoriq_tmu_calibration() and deriving a bunch of
> > pointe
On Thu, Apr 4, 2019 at 12:57 AM Daniel Lezcano
wrote:
>
> On 01/04/2019 06:14, Andrey Smirnov wrote:
> > Embed per-sensor data into struct qoriq_tmu_data so we can drop the
> > code allocating it. This also allows us to get rid of per-sensor back
> > reference to struct
On Wed, Apr 3, 2019 at 8:28 PM Daniel Lezcano wrote:
>
> On 01/04/2019 06:14, Andrey Smirnov wrote:
> > Add local struct qoriq_sensor pointer in qoriq_tmu_register_tmu_zone()
> > for brevity.
> >
> > Signed-off-by: Andrey Smirnov
> > Cc: Chris Healy
&g
On Wed, Apr 3, 2019 at 8:21 PM Daniel Lezcano wrote:
>
> On 01/04/2019 06:14, Andrey Smirnov wrote:
> > This driver is meant to be used with Device Tree and there's no
> > use-case where device's DT node is going to be NULL. Remove code
> > protecting against
Add a node for reset controller IP block found on i.MX8MQ.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Reviewed-by: Fabio Estevam
Cc: Shawn Guo
Cc: Fabio Estevam
Cc: Chris Healy
Cc: Lucas Stach
Cc: Leonard Crestez
Cc: "A.s. Dong"
Cc: Richard Zhu
Cc: linux-...@
- Dropped unsupported IRQ from PCIe nodes (a leftover from vendor tree)
- Added "pcie_aux" clock and moved clock configuration to board
file since "pcie_bus" clock is now board specific
Thanks,
Andrey Smirnov
[v1]
https://lore.kernel.org/lkml/20190131204333.318
Add nodes for two PCIe controllers found on i.MX8MQ.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Reviewed-by: Fabio Estevam
Cc: Shawn Guo
Cc: Fabio Estevam
Cc: Chris Healy
Cc: Lucas Stach
Cc: Leonard Crestez
Cc: "A.s. Dong"
Cc: Richard Zhu
Cc: linux-...@nxp.com
Cc:
Mark iomuxc_gpr as compatible with "fsl,imx6q-iomuxc-gpr" in order for
to allow i.MX6 PCIe driver to use it.
Signed-off-by: Andrey Smirnov
Acked-by: Lucas Stach
Reviewed-by: Fabio Estevam
Cc: Shawn Guo
Cc: Fabio Estevam
Cc: Chris Healy
Cc: Lucas Stach
Cc: Leonard Crestez
Cc:
Enable PCIE0 interface connected to BCM4356 WiFi/Bluetooth module.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Reviewed-by: Fabio Estevam
Cc: Shawn Guo
Cc: Fabio Estevam
Cc: Chris Healy
Cc: Lucas Stach
Cc: Leonard Crestez
Cc: "A.s. Dong"
Cc: Richard Zhu
Cc: linux-.
pgc_pcie' power domain.
Signed-off-by: Andrey Smirnov
Reviewed-by: Lucas Stach
Reviewed-by: Fabio Estevam
Cc: Shawn Guo
Cc: Fabio Estevam
Cc: Chris Healy
Cc: Lucas Stach
Cc: Leonard Crestez
Cc: "A.s. Dong"
Cc: Richard Zhu
Cc: linux-...@nxp.com
Cc: linux-arm-ker...@lists.
ent for a new device,
generating the next syslog entry
Both CONFIG_I2C_DEBUG_CORE and CONFIG_POWER_SUPPLY_DEBUG were reported
in https://bugs.freedesktop.org/show_bug.cgi?id=76886 but only former
seems to have been fixed. Change debug prints to use pr_debug insted
to resolve the issue.
Signed-off-by
Use devm_iio_device_register() and drop explicit call to
iio_device_unregister().
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc: Hartmut Knaack
Cc: Lars-Peter Clausen
Cc: Peter Meerwald-Stadler
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Since imx7d_adc_remove() does exactly the same thing as
imx7d_adc_suspend() we can use the latter together with
devm_add_action_or_reset() to get rid of the former.
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc: Hartmut Knaack
Cc: Lars-Peter Clausen
Cc: Peter Meerwald-Stadler
Cc
Initialization sequence performed in imx7d_adc_resume() is exactley
the same as what's being done in imx7d_adc_probe(). Make use of the
former in the latter to avoid code duplication.
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc: Hartmut Knaack
Cc: Lars-Peter Clausen
Cc:
Use devm_platform_ioremap_resource() to be able to drop a bit of
explicit boilerplate code.
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc: Hartmut Knaack
Cc: Lars-Peter Clausen
Cc: Peter Meerwald-Stadler
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Replace combination of pr_err()/dev_name() with an equivalent call for
dev_err().
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc: Hartmut Knaack
Cc: Lars-Peter Clausen
Cc: Peter Meerwald-Stadler
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Use a local "struct device *dev" in imx7d_adc_probe() for brevity. No
functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Jonathan Cameron
Cc: Hartmut Knaack
Cc: Lars-Peter Clausen
Cc: Peter Meerwald-Stadler
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: li
Everyone:
This series is a number of small improvements I made to i.MX7D ADC
driver. Hopefully each patch is self-explanatory.
Feedback is welcome!
Thanks,
Andrey Smirnov
Andrey Smirnov (6):
iio: imx7d_adc: Add local struct device pointer in imx7d_adc_probe()
iio: imx7d_adc: Replace pr_err
Spi_to_pdata() is not used anywhere in the code. Drop it.
Signed-off-by: Andrey Smirnov
Cc: Mark Brown
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/spi/spi-gpio.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/spi/spi-gpio.c b
Signed-off-by: Andrey Smirnov
Cc: Mark Brown
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/spi/spi-gpio.c | 134 ++---
1 file changed, 59 insertions(+), 75 deletions(-)
diff --git a/drivers/spi/spi-gpio.c b/drive
The logic of setting mflags in spi_gpio_request() is very simple and
there isn't much benefit in having it in that function. Move all of
that code outside into spi_gpio_probe() in order to simplify things.
Signed-off-by: Andrey Smirnov
Cc: Mark Brown
Cc: Chris Healy
Cc:
Use a local "struct spi_bitbang *bb" in spi_gpio_probe() for
brevity. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Mark Brown
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/spi/spi-gpio.c | 27 ++---
Drop unused pdata copy in struct spi_gpio. No functional change
intended.
Signed-off-by: Andrey Smirnov
Cc: Mark Brown
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/spi/spi-gpio.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/spi
There's a number of failure paths in spi_gpio_probe() that do not call
spi_master_put() potentially leaking memory. Fix this problem by
registering a cleanup funciont via devm_add_action_or_reset() right
after SPI controller is allocated.
Signed-off-by: Andrey Smirnov
Cc: Mark Brown
Cc:
Move all of the code doing struct spi_bitbang initialization, so that
it can be paired with devm_spi_register_master() in order to avoid
having to call spi_bitbang_stop() explicitly.
Signed-off-by: Andrey Smirnov
Cc: Mark Brown
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel
There's no code using 'pdev' field in struct spi_gpio. Drop it.
Signed-off-by: Andrey Smirnov
Cc: Mark Brown
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/spi/spi-gpio.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/s
spi0 CS1) out lo
gpio-41 (|spi0 CS0) out lo ACTIVE LOW
gpio-42 (|miso) in hi
gpio-43 (|mosi) in lo
gpio-44 (|sck ) out lo
Signed-off-by: Andrey
Swap branches of the if statement in order to simplify it's logical
condition being checked. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Mark Brown
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/spi/spi-gpio.c
301 - 400 of 1082 matches
Mail list logo