In a mixed DMA/IRQ use-case (e.g.: DMA for TX, IRQ for RX), interrupt
handler might try to handle Rx/Tx condition it shouldn't. Change the
code to only handle TX/RX event if corresponding path isn't being
handled by DMA.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
artup().
This change will also not enable TIE in .resume(), but it seems that,
similart to .startup(), transmit interrupt shouldn't be enabled there
either.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Code doing final steps of TX/RX configuration in lpuart32_startup()
and lpuart_resume() is identical, so move it into a standalone
subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Code configure DMA TX path in lpuart_startup(), lpuart32_startup() and
lpuart_resume() is doing exactly the same thing, so move it into a
standalone subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri
The vast majority of the serial drivers check for
uart_tx_stopped(&p->port) || uart_circ_empty(xmit)
condition one or more times. Create a dedicated helper function and
convert drivers to use it.
Signed-off-by: Andrey Smirnov
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: Chris He
In a mixed DMA/IRQ use-case (e.g.: DMA for TX, IRQ for RX), interrupt
handler might try to handle Rx/Tx condition it shouldn't. Change the
code to only handle TX/RX event if corresponding path isn't being
handled by DMA.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchan
From: Stefan Agner
After overruns the FIFO pointers become misaligned. This
typically shows by characters still being stuck in the FIFO
despite the empty flag being asserted. After the first
assertion of the overrun flag the empty flag still seems to
indicate FIFO state correctly and all data can
n all that, drop the call to lpuart_stop_tx() in
lpuart_shutdown().
In case of lpuart32_shutdown()/lpuart32_stop_tx(), TIE won't even be
set if lpuart_dma_tx_use is true. Drop it there as well.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory
Code doing final steps of TX/RX configuration in lpuart32_startup()
and lpuart_resume() is identical, so move it into a standalone
subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri
artup().
This change will also not enable TIE in .resume(), but it seems that,
similart to .startup(), transmit interrupt shouldn't be enabled there
either.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-H
Most users of lpuart*_setup_watermark() enable identical set of flags
right after the call, so combine those two action into a subroutine
and make use of it.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah
Fix bogus indentation in rx_dma_timer_init().
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Code doing initial DMA RX configuration in lpuart_startup() and
lpuart32_startup() is exactly the same, so move it into a standalone
subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc
The check for
uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)
appears in multiple places in the driver. Move it into a helper
function.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hart
Code configure DMA TX path in lpuart_startup(), lpuart32_startup() and
lpuart_resume() is doing exactly the same thing, so move it into a
standalone subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah
lpuart_txint into
lpuart_txint and lpuart32_txint so we can drop all extra
lpuart_is_32() check and make the code flow more linear.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Sg_init_one() will already call sg_set_buf(), so another explicit call
right after it is unnecessary. Drop it.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc
ommit
5e42e9a30cda ("serial: imx: Fix x_char handling and tx flow control")
where this problem was fixed in a very similarly structured i.MX UART
driver.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
or us to restrict the prototype
of the handler to irqreturn_t foo(int, void *) and we can drop all of
uneened boilerplate code by changing it void foo(struct lpuart_port *).
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc:
Switching baud rate might cause bogus data to appear in HW
FIFO. Add code to do a HW FIFO flush to .flush_buffer callback to
avoid that.
Signed-off-by: Fugang Duan
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg
Clearing CSTOPB bit if it is set is functionally equivalent to jsut
clearing it unconditionally. Drop unnecessary check.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Drop unnecessary extra parenthesis in the driver.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser...@vger.kernel.org
Cc: linux-kernel
Use cpu_relax() instead of barrier() in a tight polling loops to make
them a bit more idiomatic. Should also improve things on ARM64 a bit
since cpu_relax() will expand into "yield" instruction there.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
When dealing with 32-bit variant of LPUART IP block appropriate I/O
helpers have to be used to properly deal with endianness
differences. Change all of the offending code to do that.
Fixes: a5fa2660d787 ("tty/serial/fsl_lpuart: Add CONSOLE_POLL support
for lpuart32.")
Signed-off-
The check for termios->c_cflag & CRTSCTS ensure that if we reach else
branch, CRTSCTS in termios->c_cflag is already going to be
cleard. Doing so explicitly there is not necessary. Drop it.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory
during this operation and when reading the data register to
minimize potential interference.
Signed-off-by: Stefan Agner
Acked-by: Max Krummenacher
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri
Everyone:
This series contains fixes/improvements to LPUART dirver I came up
with recently as well as fixes picked up from Toradex and NXP Vybrid
repos.
Feedback is welcome!
Thanks,
Andrey Smirnov
Andrey Smirnov (22):
tty: serial: fsl_lpuart: Flush HW FIFOs in .flush_buffer
tty: serial
On Tue, Jul 30, 2019 at 8:51 AM Greg Kroah-Hartman
wrote:
>
> On Mon, Jul 29, 2019 at 12:52:08PM -0700, Andrey Smirnov wrote:
> > Sg_init_one() will already call sg_set_buf(), so another explicit call
> > right after it is unnecessary. Drop it.
> >
> > Signed-
On Tue, Jul 30, 2019 at 8:56 AM Greg Kroah-Hartman
wrote:
>
> On Mon, Jul 29, 2019 at 12:52:21PM -0700, Andrey Smirnov wrote:
> > Code configure DMA TX path in lpuart_startup(), lpuart32_startup() and
> > lpuart_resume() is doing exactly the same thing, so move it into a
> &g
On Mon, Aug 5, 2019 at 11:48 PM Andy Shevchenko
wrote:
>
> On Mon, Aug 5, 2019 at 10:36 PM Andrey Smirnov
> wrote:
> >
> > The vast majority of the serial drivers check for
> >
> > uart_tx_stopped(&p->port) || uart_circ_empty(xmit)
> >
>
On Sun, Jun 23, 2019 at 5:29 PM Shawn Guo wrote:
>
> On Mon, Jun 17, 2019 at 08:30:24AM -0700, Andrey Smirnov wrote:
> > Add support for ZII's i.MX7 based Remote Modem Unit 2 (RMU2) board.
> >
> > Signed-off-by: Andrey Smirnov
> > Cc: Shawn Guo
> > Cc:
Add support for ZII i.MX7 RMU2 board.
Signed-off-by: Andrey Smirnov
Reviewed-by: Fabio Estevam
Reviewed-by: Rob Herring
Cc: Shawn Guo
Cc: Chris Healy
Cc: Lucas Stach
Cc: Fabio Estevam
Cc: Bob Langer
Cc: Liang Pan
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Add support for ZII's i.MX7 based Remote Modem Unit 2 (RMU2) board.
Signed-off-by: Andrey Smirnov
Reviewed-by: Fabio Estevam
Cc: Shawn Guo
Cc: Rob Herring
Cc: Chris Healy
Cc: Lucas Stach
Cc: Fabio Estevam
Cc: Bob Langer
Cc: Liang Pan
Cc: linux-arm-ker...@lists.infradead.org
Cc:
Add support for ZII i.MX7 RMU2 board.
Signed-off-by: Andrey Smirnov
Reviewed-by: Fabio Estevam
Reviewed-by: Rob Herring
Cc: Shawn Guo
Cc: Chris Healy
Cc: Lucas Stach
Cc: Fabio Estevam
Cc: Bob Langer
Cc: Liang Pan
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Add support for ZII's i.MX7 based Remote Modem Unit 2 (RMU2) board.
Signed-off-by: Andrey Smirnov
Cc: Shawn Guo
Cc: Rob Herring
Cc: Chris Healy
Cc: Lucas Stach
Cc: Fabio Estevam
Cc: Bob Langer
Cc: Liang Pan
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.o
Everyone:
Picking up where Chris left off (I chatted with him privately
beforehead), this series adds support for i.MX8MQ to CAAM driver. Just
like [v1], this series is i.MX8MQ only.
Feedback is welcome!
Thanks,
Andrey Smirnov
Changes since [v2]:
- Dropped "crypto: caam - do not initi
apparently those are not implemented, so the
case when SCFGR[VIRT_EN]=0 should be handles the same as the case when
SCFGR[VIRT_EN]=1
Signed-off-by: Andrey Smirnov
Cc: Chris Spencer
Cc: Cory Tusar
Cc: Chris Healy
Cc: Lucas Stach
Cc: Horia Geantă
Cc: Aymen Sghaier
Cc: Leonard Crestez
Cc: linux-cry
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.n
Feedback is welcome!
Thanks,
Andrey Smirnov
Changes since [v5]
- Rebased on recent linux-next, dropped
Add local struct qoriq_sensor pointer in qoriq_tmu_register_tmu_zone()
for brevity.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: Angus Ainslie (Purism)
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux
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
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
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
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...@
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
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
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
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 qoriq_tmu_data since now its address can be
caluclated using container_of().
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas
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
Since 32-bit of both wr_reg64 and rd_reg64 now use 64-bit IO helpers,
these functions should no longer be necessary. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Chris Spencer
Cc: Cory Tusar
Cc: Chris Healy
Cc: Lucas Stach
Cc: Horia Geantă
Cc: Aymen Sghaier
Cc: Leonard
Add clock entry needed to support i.MX8MQ.
Signed-off-by: Andrey Smirnov
Cc: Chris Spencer
Cc: Cory Tusar
Cc: Chris Healy
Cc: Lucas Stach
Cc: Horia Geantă
Cc: Aymen Sghaier
Cc: Leonard Crestez
Cc: linux-cry...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/crypto/caam
Following the same transformation logic as outlined in previous commit
converting wr_reg64, convert rd_reg64 to use helpers from
first. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Chris Spencer
Cc: Cory Tusar
Cc: Chris Healy
Cc: Lucas Stach
Cc: Horia Geantă
Cc: Aymen
apparently those are not implemented, so the
case when SCFGR[VIRT_EN]=0 should be handles the same as the case when
SCFGR[VIRT_EN]=1
Signed-off-by: Andrey Smirnov
Cc: Chris Spencer
Cc: Cory Tusar
Cc: Chris Healy
Cc: Lucas Stach
Cc: Horia Geantă
Cc: Aymen Sghaier
Cc: Leonard Crestez
Cc: linux-cry
Instead of selecting the implementation of
cpu_to_caam_dma()/caam_dma_to_cpu() at build time using the
preprocessor, convert the code to do that at run-time using IS_ENABLED
macro. This is needed to add support for i.MX8MQ. No functional change
intended.
Signed-off-by: Andrey Smirnov
Cc: Chris
On Thu, Jun 6, 2019 at 3:59 AM Andrzej Hajda wrote:
>
> On 05.06.2019 09:04, Andrey Smirnov wrote:
> > Simplify AUX data read by removing index arithmetic and shifting with
> > a helper functions that does three things:
> >
> > 1. Fetch data from up to 4
Simplify AUX data read by removing index arithmetic and shifting with
a helper function that does two things:
1. Fetch data from up to 4 32-bit registers from the chip
2. Copy read data into user provided array.
Signed-off-by: Andrey Smirnov
Reviewed-by: Andrzej Hajda
Cc: Andrzej Hajda
We don't need 8 byte array, DP_LINK_STATUS_SIZE (6) should be
enough. This also gets rid of a magic number as a bonus.
Signed-off-by: Andrey Smirnov
Cc: Andrzej Hajda
Cc: Laurent Pinchart
Cc: Tomi Valkeinen
Cc: Andrey Gusakov
Cc: Philipp Zabel
Cc: Cory Tusar
Cc: Chris Healy
Cc:
problem was encountered on VF610 CFU1 board with
CONFIG_FSL_EDMA=n.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Wolfram Sang
Cc: Fabio Estevam
Cc: NXP Linux Team
Cc: linux-...@vger.kernel.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
drivers/i2c/busses
On Thu, Jun 27, 2019 at 11:27 AM Sebastian Reichel wrote:
>
> Hi,
>
> On Wed, Jun 12, 2019 at 01:44:04AM -0700, Andrey Smirnov wrote:
> > Add code implementing HWMON adapter/compatibility layer to allow
> > expositing various sensors present on power supply devices via H
On Fri, Mar 8, 2019 at 5:23 AM Christoph Hellwig wrote:
>
> On Wed, Feb 06, 2019 at 04:13:12PM -0800, Andrey Smirnov wrote:
> > Code polling NVME_CSTS_SHST_CMPLT in nvme_shutdown_ctrl() is very
> > similar to polling loop in nvme_wait_ready(). Move shared polling
The only difference between two codepaths is register offset
used. Simplify the code a bit by replacing explicit calls with a
single call with a variable offset. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Linus Walleij
Cc: Bartosz Golaszewski
Cc: Chris Healy
Cc: Andrew
Everyone:
This series contains a number of fixes/improvements I came up with
while working VF610 GPIO code. Hopefully each commit is
self-explanatory.
Feedback is welcome!
Thanks,
Andrey Smirnov
Andrey Smirnov (7):
gpio: vf610: Do not share irq_chip
gpio: vf610: Simplify vf610_gpio_set
Both branches of the if statement do exactly the same thing, just at
different offsets. Simplify the code a bit by moving shared action
code outside of the if statement. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Linus Walleij
Cc: Bartosz Golaszewski
Cc: Chris Healy
Cc
The code already defines "dev" variable to help with that, so make
sure all of the code uses it.
Signed-off-by: Andrey Smirnov
Cc: Linus Walleij
Cc: Bartosz Golaszewski
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Fabio Estevam
Cc: linux-g...@vger.kernel.org
Cc: li
Now that the driver's custom remove hook contains only a single
action, replace it by converting the code to use
devm_gpiochip_add_data() to simplify things.
Signed-off-by: Andrey Smirnov
Cc: Linus Walleij
Cc: Bartosz Golaszewski
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc:
.
Signed-off-by: Andrey Smirnov
Cc: Linus Walleij
Cc: Bartosz Golaszewski
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Fabio Estevam
Cc: linux-g...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-...@nxp.com
---
drivers/gpio/gpio-vf610.c | 6 --
1 file changed, 4
removal.
Signed-off-by: Andrey Smirnov
Cc: Linus Walleij
Cc: Bartosz Golaszewski
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Fabio Estevam
Cc: linux-g...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-...@nxp.com
---
drivers/gpio/gpio-vf610.c | 16 ++--
1
Fix the warning produced by gpiochip_set_irq_hooks() by allocating a
dedicated IRQ chip per GPIO chip/port.
Signed-off-by: Andrey Smirnov
Cc: Linus Walleij
Cc: Bartosz Golaszewski
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Fabio Estevam
Cc: linux-g...@vger.kernel.org
Cc: linux
Add Device Tree for VF610 based Zodiac Seat Power Box.
Signed-off-by: Andrey Smirnov
Cc: Shawn Guo
Cc: Chris Healy
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Fabio Estevam
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-...@nxp.com
---
arch/arm/boot/dts
, since as
I mentioned above there are multiple thermal zones (CPU, GPU, VPU).
> + };
> +
> + thermal-zones {
> + cpu-thermal {
> + polling-delay-passive = <250>;
> + polling-delay = <2000>;
> + thermal-sensors = <&tmu>;
Ditto.
Thanks,
Andrey Smirnov
On Wed, Feb 20, 2019 at 4:52 PM Eduardo Valentin wrote:
>
> Hey Andrey
>
> On Mon, Feb 18, 2019 at 11:11:29AM -0800, Andrey Smirnov wrote:
> > Everyone:
> >
> > This series contains patches adding support for HWMON integration,
> > multi-sensor suppor
On Wed, Feb 20, 2019 at 4:57 PM Eduardo Valentin wrote:
>
> On Mon, Feb 18, 2019 at 11:11:41AM -0800, Andrey Smirnov wrote:
> > TMU IP block provides temerature measurement for up to 16 sites,
> > current implementation of the driver however hardcodes a single site
> > I
sequently would be able to drop the "err_iomap" error path.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/the
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 that.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-.
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 qoriq_tmu_data since now its address can be
caluclated using container_of().
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas
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 [v1]
- Rebased on "linus"
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
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.ker
Add local struct qoriq_sensor pointer in qoriq_tmu_register_tmu_zone()
for brevity.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
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: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Add devres wrapper for thermal_add_hwmon_sysfs() to simplify driver
code.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers
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
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
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: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@
, for the sake of simplicity, change the code to
do just that.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/thermal/qoriq_ther
Use a local "struct device *dev" for brevity. No functional change
intended.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
--
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
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: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
On Mon, Feb 18, 2019 at 8:57 PM Andrey Smirnov wrote:
>
> On Mon, Feb 18, 2019 at 4:58 AM Marcel Holtmann wrote:
> >
> > Hi Andrey,
> >
> > > Due to:
> > >
> > > - current implementation of l2cap_config_rsp() dropping BT
> > > connect
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: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@
.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/thermal/qoriq_thermal.c | 14 +++---
1 file changed, 7 insertions(+), 7
Everyone:
This series contains patches adding support for HWMON integration,
multi-sensor support as well as a small fix and general improvements
(hopefully) for TMU driver I made while working on it on i.MX8MQ.
Feedback is welcome!
Thanks,
Andrey Smirnov
Andrey Smirnov (12):
thermal_hwmon
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
TMU IP block provides temerature measurement for up to 16 sites,
current implementation of the driver however hardcodes a single site
ID. Change the code so it would be possible to reference multiple
sites as indivudial sensors and get their temperature readings.
Signed-off-by: Andrey Smirnov
Cc
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 that.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-.
Use goto to avoid repeating resource deallocation code.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/thermal
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: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
sequently would be able to drop the "err_iomap" error path.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/the
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: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Add devres wrapper for thermal_add_hwmon_sysfs() to simplify driver
code.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers
Use a local "struct device *dev" for brevity. No functional change
intended.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Lucas Stach
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: Daniel Lezcano
Cc: linux-...@nxp.com
Cc: linux...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
--
901 - 1000 of 1611 matches
Mail list logo