Change license owner to Prevas due to initially wrong owner due to company
mix-up during co-development.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Add support for nPM1304 in the npm13xx drivers. The nPM1304 supports
different voltage and current ranges which are handled through the
initialization macros.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Rename npm1300 to npm13xx in function names, documentation, etc. where
applicable for all the npm13xx drivers
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Rename npm1300 drivers and header files to npm13xx to allow for usage
with other nPM13xx product variants.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
The FLEXCOM offers several serial communication protocols that are
managed by the three sub-modules USART, SPI, and TWI (I2C).
Signed-off-by: Tony Han <tony.han@microchip.com>
A -1 was missing from the timer value calculation. In addition,
DIV_ROUND_CLOSEST was replaced with a custom macro fixing #84782.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Add possibility to configure open drain and pull up on nPM2100's
interrupt output through DTS flags.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Add initial support for the AXP2101 power management IC from X-powers.
Remark: only DC/DC1 and ALDO have been tested on real hardware.
Co-authored-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Co-authored-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
When building with clang it warns:
drivers/mfd/mfd_adp5585.c:59:6: error: variable 'reg_int_status' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
if (ret == 0) {
^~~~~~~~
drivers/mfd/mfd_adp5585.c:70:7: note: uninitialized use occurs here
if ((reg_int_status & ADP5585_INT_GPI)
^~~~~~~~~~~~~~ && device_is_ready(data->child.gpio_dev)) {
drivers/mfd/mfd_adp5585.c:59:2: note: remove the 'if' if its condition
is always true
if (ret == 0) {
^~~~~~~~~~~~~~
drivers/mfd/mfd_adp5585.c:54:24: note: initialize the variable
'reg_int_status' to silence this warning
uint8_t reg_int_status;
^
= '\0'
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Do not reconfigure the SHPHLD button behavior by writing to the sticky
register in drivers: mfd, regulator: npm2100. This is removed to avoid
unexpected behaviors during or after the ship or hibernation modes.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Extend mfd_npm2100_hibernate function with pass_through argument,
which is used to differentiate between hibernate and hibernate_pt
modes.
Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
This is a squash of all the groundwork needed to
get a functioning driver for the DS3231 with the RTC API.
Signed-off-by: Gergo Vari <work@gergovari.com>
Add support for GPIO controller feature of AW9523B.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Co-authored-by: Benjamin Cabé <kartben@gmail.com>
Add mfd driver for the npm2100 pmic device.
The driver contains basic initialization routines,
and functionality not covered by other device driver APIs.
Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
IT8801 support GPIO alternate function switching.
Some GPIO pins can be switched as KSO or PWM function.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
The IT8801 is an I/O expander that provides GPIO, PWM, Keyboard
functions via the I2C bus.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Implement the parallel mode in the powertrain switch TLE9104.
This allows that OUT1 and OUT2 are controlled together, as well
as OUT3 and OUT4.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Add mfd_adp5585 and gpio_adp5585 driver. This driver enables ADP5585
as an GPIO expander.
This chip is used as an GPIO expander on i.MX93 EVK. GPIO pinctrl,
read/write and interrupt is supported.
Note that ADP5585 has 2 GPIO banks with 5 pins each. The driver combines
two group into a 16-bit port. Index 0~4 correspond to R0~R4 lines, index
8~12 correspond to C0~C4 lines. Index 5~7 is reserved unavailable.
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
Added write of strobe register after setting long press reset
configuration. This is needed to apply the new value.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Implement a sensor for the output diagnostics of the power train
switch TLE9104.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Rename ad5592 files in dts, driver and include to ad559x and add support
for I2C bus which is required for AD5593.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Added configuration of long press reset functionality.
Includes ship/hibernate to wake debounce time and
disabled/one_button/two_button mode selection.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Split up the driver for the PWM controller MAX31790
into a multi function device driver.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Split up the driver for the low side switch BD8LB600FS into a GPIO
and MFD part.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
1. This driver allows to configure the Low Power Flexcomm
interface as a UART, SPI or I2C device.
2. Manages the interrupts and dispatches it to the
appropriate device driver.
3. A Flexcomm interface can be configured to be used as
I2C and UART device. However a SPI device cannot be used
concurrently with I2C or UART. Add checks for this feature.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
By default N_VBUSEN signal is used by the host to define if VBUS
signal should be used for power supply (VBUS-IPSOUT).
This feature enables the possbibility to change this behaviour.
When N_VBUSEN detection is disabled, axp192 will automatically
decide to use VBUS (REG10H[7] = 1).
Please refer to datasheet for details.
Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
AXP192 features an EXTEN pin that is on output only.
This commit appends control of EXTEN pin to gpio functionality
of AXP192.
Port-Mapping is as follows:
- [0..4]: GPIO0..4
- [5]: EXTEN
Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
Use proper register mask for software reset register so
reset magic value sent to device is not malformed.
Co-authored-by: Bartosz Bilas <b.bilas@grinn-global.com>
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
Enables setting the initialization priority of the nPM1300 independently
from other MFDs.
Signed-off-by: Bernt Johan Damslora <Bernt.Damslora@nordicsemi.no>
Enables setting the initialization priority of the nPM6001 independently
from other MFDs.
Signed-off-by: Bernt Johan Damslora <Bernt.Damslora@nordicsemi.no>
Maxim MAX20335 is a PMIC with Ultra-Low IQ Voltage Regulators and
Battery Chargers for Small Lithium Ion Systems.
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
If an event occurs between the status registers being read and
the event being cleared, the interrupt line will remain active.
As the interrupt is edge triggered, all future interrupts
will being ignored. This problem will also occur if an I2C
transation fails in the callback.
The state of the interrupt pin is now checked at the end of the
callback, and a retry is attempted if the interrupt has not
been cleared.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
The Nuvoton NCT38xx is a multi-function device providing a TCPC
controller and a I/O expander (GPIO driver). Add a multi-function
driver to manage exclusive access to the device.
Tested with "twister -T tests/drivers/build_all/gpio".
Signed-off-by: Keith Short <keithshort@google.com>