Home | History | Annotate | Download | only in i2c
History log of /src/sys/dev/i2c/tps65217pmic.c
RevisionDateAuthorComments
 1.21  17-Sep-2025  thorpej These drivers conditionally support FDT (with an #ifdef). Rather than
blindly assume that i2c_attach_args::ia_cookie is an FDT phandle, consult
self's devhandle and, if the type is DEVHANDLE_TYPE_OF, exctract the phandle
from there.

XXX These drivers should probably become FDT-only (like many others already
are) because the functionality is questionable without information from the
device tree.
 1.20  07-Aug-2021  thorpej branches: 1.20.2;
Merge thorpej-cfargs2.
 1.19  24-Apr-2021  thorpej branches: 1.19.2; 1.19.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.18  27-Jan-2021  thorpej branches: 1.18.2;
Use DEVICE_COMPAT_EOL.
 1.17  25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.16  17-Jan-2021  thorpej Use designated initializers and a consistent termination style in
compat_data[].
 1.15  23-Dec-2019  thorpej branches: 1.15.8;
- No need to use I2C_F_POLL here.
- Refactor register read / write functions, splitting out i2c bus
acquire / release everywhere. This fixes what was almost certainly
a deadlock in the FDT regulator section of the code (acquire bus ->
read register, which again acquires bus -> locking against myself).
 1.14  03-Nov-2019  jmcneill Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context
 1.13  27-Oct-2019  jmcneill Add FDT support
 1.12  16-Jun-2018  thorpej branches: 1.12.2; 1.12.8;
More cleanup to i2c autoconfiguration:

- Get all of the drivers onto the new match quality constants.
- Introduce a new helper function, iic_use_direct_match(), that has
all of the logic for direct-config matching. If it returns true,
the driver returns the match result (which may be 0). If it returns
false, the driver does indirect-config matching.
- iic_compat_match() now returns a weighted match quality; matches to
lower-indexed "compatible" device property are more-specific matches,
and return a better match quality accordingly.
 1.11  15-Oct-2016  kiyohara branches: 1.11.14;
Add White LED initialize function.
 1.10  20-Jul-2014  bouyer branches: 1.10.4; 1.10.8;
Add a callback to change the regulator outputs.
Tested on beaglebone.
 1.9  08-Jan-2014  jakllsch branches: 1.9.2; 1.9.4;
Fix whitespace issues.
 1.8  08-Jan-2014  jakllsch Add unused tps65217pmic_reg_write() function.
 1.7  31-Dec-2013  skrll Remove unused variable.

OK rkujawa
 1.6  04-Aug-2013  rkujawa Monitor for power source changes and report with appropriate information in
dmesg, a pmf event and sysmon_pswitch event.
 1.5  16-May-2013  rkujawa branches: 1.5.2; 1.5.4;
Fix typo: s/300/500/ .
 1.4  28-Apr-2013  jakllsch remove trailing whitespace
 1.3  26-Apr-2013  rkujawa Add envsys(4) support to TPS65217 PMIC driver.
 1.2  26-Apr-2013  rkujawa Add sanity, flexibility and readability to TPS65217 driver. In preparation to
add envsys support.
 1.1  25-Apr-2013  rkujawa Add minimal support for TPS65217 PMIC as found on BeagleBone. Next step is to
expose regulated voltages through envsys(4).
 1.5.4.2  18-May-2014  rmind sync with head
 1.5.4.1  28-Aug-2013  rmind sync with head
 1.5.2.4  03-Dec-2017  jdolecek update from HEAD
 1.5.2.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.2  23-Jun-2013  tls resync from head
 1.5.2.1  16-May-2013  tls file tps65217pmic.c was added on branch tls-maxphys on 2013-06-23 06:20:17 +0000
 1.9.4.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9.4.1  08-Jan-2014  yamt file tps65217pmic.c was added on branch yamt-pagecache on 2014-05-22 11:40:21 +0000
 1.9.2.1  10-Aug-2014  tls Rebase.
 1.10.8.1  04-Nov-2016  pgoyette Sync with HEAD
 1.10.4.1  05-Dec-2016  skrll Sync with HEAD
 1.11.14.1  25-Jun-2018  pgoyette Sync with HEAD
 1.12.8.1  27-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #491):

sys/arch/evbarm/conf/BEAGLEBOARD_INSTALL: file removal
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.2
sys/arch/arm/ti/ti_sysc.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.1
sys/arch/arm/ti/ti_rng.c: revision 1.2
sys/dev/i2c/tps65950.c: file removal
sys/arch/evbarm/conf/std.ti: file removal
sys/dev/i2c/files.i2c: revision 1.101
sys/dev/i2c/files.i2c: revision 1.102
sys/dev/i2c/at24cxx.c: revision 1.32
sys/dev/i2c/files.i2c: revision 1.103
sys/dev/i2c/twl4030.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.104
sys/dev/i2c/twl4030.c: revision 1.2
sys/dev/i2c/twl4030.c: revision 1.3
sys/arch/arm/ti/ti_com.c: revision 1.6
sys/arch/arm/ti/ti_com.c: revision 1.7
sys/arch/arm/ti/ti_com.c: revision 1.8
sys/dev/fdt/cpufreq_dt.c: revision 1.11
sys/arch/arm/ti/ti_iic.c: revision 1.1
sys/dev/fdt/cpufreq_dt.c: revision 1.12
sys/arch/arm/ti/ti_usb.c: revision 1.1
sys/arch/arm/ti/ti_iic.c: revision 1.2
sys/dev/fdt/cpufreq_dt.c: revision 1.13
sys/arch/arm/ti/ti_iic.c: revision 1.3
sys/arch/arm/ti/ti_iic.c: revision 1.4
sys/arch/evbarm/conf/files.ti: file removal
sys/arch/evbarm/conf/BEAGLEBOARDXM: file removal
sys/arch/arm/dts/omap3-n900.dts: revision 1.1
sys/arch/arm/ti/ti_edma.h: revision 1.1
sys/arch/evbarm/conf/OVERO_INSTALL: file removal
sys/arch/arm/ti/ti_usbtll.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.5
etc/etc.evbarm/Makefile.inc: revision 1.108
sys/arch/arm/ti/files.ti: revision 1.6
sys/dev/i2c/tps65217pmic.c: revision 1.13
etc/etc.evbarm/Makefile.inc: revision 1.109
sys/arch/arm/ti/files.ti: revision 1.7
sys/dev/i2c/tps65217pmic.c: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.8
sys/arch/arm/ti/files.ti: revision 1.9
sys/dev/fdt/usbnopphy.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.55
sys/arch/evbarm/conf/GENERIC: revision 1.56
sys/arch/evbarm/conf/GENERIC: revision 1.57
sys/arch/evbarm/conf/GENERIC: revision 1.58
sys/arch/evbarm/conf/GENERIC: revision 1.59
sys/arch/evbarm/conf/BEAGLEBONE: file removal
sys/arch/arm/ti/omap2_gpmcreg.h: revision 1.1
sys/arch/arm/ti/ti_otgreg.h: revision 1.1
sys/arch/arm/ti/ti_tptc.c: revision 1.1
sys/arch/evbarm/conf/IGEPV2: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.10
sys/dev/i2c/tda19988.c: revision 1.1
sys/arch/evbarm/conf/OVERO: file removal
sys/dev/i2c/tda19988.c: revision 1.2
sys/dev/i2c/tda19988.c: revision 1.3
sys/arch/arm/ti/omap3_dss.c: revision 1.1
sys/arch/evbarm/conf/BEAGLEBONE_INSTALL: file removal
sys/arch/arm/ti/ti_omapintc.c: revision 1.2
etc/etc.evbarm/Makefile.inc: revision 1.112
etc/etc.evbarm/Makefile.inc: revision 1.113
sys/arch/arm/ti/ti_div_clock.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revision 1.114
sys/arch/evbarm/conf/N900: revision 1.32
sys/arch/evbarm/conf/N900: revision 1.33
distrib/utils/embedded/conf/armv7.conf: revision 1.36
sys/arch/evbarm/conf/GENERIC: revision 1.60
distrib/utils/embedded/conf/armv7.conf: revision 1.37
sys/arch/arm/ti/omap2_nand.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.61
sys/arch/arm/ti/omap2_nand.c: revision 1.2
sys/arch/evbarm/conf/GENERIC: revision 1.62
distrib/utils/embedded/conf/armv7.conf: revision 1.39
sys/arch/evbarm/conf/GENERIC: revision 1.63
sys/arch/arm/ti/ti_fb.c: revision 1.1
sys/arch/evbarm/conf/GENERIC: revision 1.64
sys/arch/evbarm/conf/GENERIC: revision 1.65
sys/arch/evbarm/conf/GENERIC: revision 1.66
sys/arch/evbarm/conf/GENERIC: revision 1.67
sys/arch/arm/ti/ti_platform.c: revision 1.7
sys/arch/arm/ti/ti_platform.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.2
sys/arch/arm/ti/ti_platform.c: revision 1.9
sys/arch/arm/ti/am3_prcm.c: revision 1.3
sys/arch/arm/ti/am3_prcm.c: revision 1.4
sys/arch/arm/ti/am3_prcm.c: revision 1.5
sys/arch/arm/ti/am3_prcm.c: revision 1.6
sys/arch/arm/ti/am3_prcm.c: revision 1.7
sys/arch/evbarm/conf/DEVKIT8000: file removal
sys/arch/arm/ti/am3_prcm.c: revision 1.8
sys/arch/arm/ti/am3_prcm.c: revision 1.9
sys/dev/fdt/syscon.c: revision 1.4
sys/arch/arm/ti/files.ti: revision 1.10
sys/arch/arm/ti/ti_mux_clock.c: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.11
sys/arch/arm/ti/if_cpswreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhc.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.12
sys/arch/arm/ti/ti_sdhc.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.13
sys/arch/arm/ti/files.ti: revision 1.14
sys/arch/arm/ti/files.ti: revision 1.15
sys/arch/arm/ti/files.ti: revision 1.16
sys/arch/arm/ti/omap3_cm.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.17
sys/arch/arm/ti/omap3_cm.c: revision 1.2
sys/arch/arm/ti/files.ti: revision 1.18
sys/arch/arm/ti/omap3_cm.c: revision 1.3
sys/arch/arm/ti/files.ti: revision 1.19
sys/arch/arm/ti/omap3_cm.c: revision 1.4
sys/arch/arm/ti/ti_motg.c: revision 1.1
sys/arch/arm/ti/ti_rngreg.h: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.1
sys/arch/arm/dts/omap3-beagle-xm.dts: revision 1.1
sys/arch/arm/ti/am3_platform.c: revision 1.1
sys/arch/arm/ti/ti_sdhcreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARDXM_INSTALL: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.22
sys/arch/evbarm/conf/README.evbarm: revision 1.23
sys/arch/arm/ti/ti_platform.c: file removal
sys/arch/evbarm/conf/README.evbarm: revision 1.24
sys/arch/arm/ti/ti_omaptimer.c: revision 1.2
sys/arch/arm/ti/ti_prcm.c: revision 1.2
sys/arch/evbarm/conf/README.evbarm: revision 1.25
sys/arch/arm/ti/ti_omaptimer.c: revision 1.3
sys/arch/arm/ti/ti_prcm.c: revision 1.3
sys/arch/evbarm/conf/README.evbarm: revision 1.26
sys/arch/arm/ti/ti_omaptimer.c: revision 1.4
sys/arch/evbarm/conf/README.evbarm: revision 1.27
sys/arch/arm/ti/ti_ehci.c: revision 1.1
sys/arch/arm/ti/files.ti: revision 1.20
sys/arch/arm/ti/ti_cpufreq.c: revision 1.1
sys/arch/arm/ti/ti_cpufreq.c: revision 1.2
sys/arch/arm/fdt/smsh_fdt.c: revision 1.2
sys/arch/arm/ti/omap3_dssreg.h: revision 1.1
sys/arch/evbarm/conf/OVERO: revision 1.56
sys/arch/evbarm/conf/TI: file removal
sys/arch/arm/dts/omap3-beagle.dts: revision 1.1
sys/dev/fdt/fdtvar.h: revision 1.55
sys/dev/fdt/fdtvar.h: revision 1.56
distrib/utils/embedded/files/armv7_boot_nonefi.cmd: revision 1.2
sys/dev/fdt/fdt_phy.c: revision 1.6
sys/arch/arm/ti/ti_iicreg.h: revision 1.1
sys/arch/arm/ti/ti_lcdc.c: revision 1.1
sys/arch/arm/ti/ti_gpio.c: revision 1.1
sys/arch/arm/ti/ti_iicreg.h: revision 1.2
sys/arch/arm/ti/ti_lcdc.c: revision 1.2
sys/dev/fdt/files.fdt: revision 1.46
sys/arch/arm/ti/ti_gpio.c: revision 1.2
sys/arch/arm/ti/ti_iicreg.h: revision 1.3
sys/arch/arm/ti/ti_lcdc.c: revision 1.3
sys/dev/fdt/files.fdt: revision 1.47
sys/arch/arm/ti/ti_gpio.c: revision 1.3
sys/dev/fdt/pinctrl_single.c: revision 1.1
sys/arch/evbarm/conf/files.generic: revision 1.9
sys/arch/arm/ti/ti_gpmc.c: revision 1.1
sys/arch/arm/ti/ti_lcdcreg.h: revision 1.1
sys/arch/evbarm/conf/BEAGLEBOARD: file removal
sys/arch/arm/ti/omap3_prm.c: revision 1.1
sys/arch/arm/ti/ti_platform.h: file removal
sys/arch/arm/ti/omap3_platform.c: revision 1.1
sys/arch/arm/ti/ti_prcm.h: revision 1.2
sys/arch/arm/ti/omap3_platform.c: revision 1.2
sys/arch/arm/ti/ti_prcm.h: revision 1.3
sys/arch/arm/ti/ti_prcm.h: revision 1.4
sys/dev/fdt/fdt_clock.c: revision 1.9
sys/arch/arm/ti/ti_edma.c: revision 1.1
sys/arch/arm/ti/ti_otg.c: revision 1.1
distrib/utils/embedded/files/armv7_boot.cmd: revision 1.15
sys/arch/arm/ti/if_cpsw.c: revision 1.7
sys/arch/evbarm/conf/std.igepv2: file removal
sys/arch/arm/ti/if_cpsw.c: revision 1.8
sys/arch/arm/ti/ti_dpll_clock.c: revision 1.1

Adapt ti fdt glue to support GENERIC kernel.

Do not search 64-bit directories for dts files

Fix am33xx_platform_early_putchar for pre-MMU output

Add bus driver for TI sysc interconncet.

Make com work again

Add EDMA TPCC and TPTC drivers.

Add driver for one-register-per-pin type pinctrl devices.

Add MMCHS support.

Add USB support.

Disable autoidle

Place devmap above KERNEL_IO_VBASE

Use Timer2 for timecounter, and enable hw module.

Add support for TI AM335x

Add atmel,24c256 compat data

Add I2C support.

Add tiiic, tps65217pmic

Add FDT support

Fix early putchar, add reset func

No support for tegra210 in armv7 kernel

Switch to GENERIC kernels only.

Get mac address from DT

Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.

enumerate devices under child "clocks" node

Add support for platform specific opp table filters.

Add fdtbus_clock_count to count the number of clock references on a given node

enumerate devices under child "clocks" node

Add AM335x DVFS support.

Enable TI AM335x DVFS support

Add support for GPIO controller.

Add tigpio

Unhook BEAGLEBONE kernel from the build
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).

Add support for hardware RNG.

Add tirng

Add explicit FDT_OPP for operating-points-v2 so the link set won't be empty

Rename SOC_TI_AM335X to SOC_AM33XX and rename ti_platform.c to
am3_platform.c

Set stdout-path on TI OMAP3 BeagleBoard

Add support for TI OMAP3.

Add OMAP3 support.

Move a lot of *.dtb files to a dtb/ subdirectory on the FAT partition.
Mkimage (eroneously) creates a FAT16 partition (despite the configuration
asking for FAT32), and that has a root directory size limit.
Idea from Jared.

Skip xref if it is 0

Add generic USB PHY driver

Add driver for TI TWL4030 Power Management IC

Use the hwmod clk to get the timer rate and explicitly enable the
timecounter timer.

Add OMAP3 USB support.

Add twl, usbnopphy, tiusb, tiusbtll

Move omap3 dtb files to /boot/dtb

Remove BEAGLEBOARD kernel from list of kernels to build
Remove BEAGLEBOARD kernel (supported by GENERIC now)

Fix PRM_RSTCTRL_RST_DPLL3 definition, now reset works.

Remove DEVKIT8000 kernel (GENERIC should work now)
Remove DPLL5 init ported from old omap code, it is not required

Set the stdout-path on xM like Ti OMAP3 BeagleBoard

Remove BEAGLEBOARDXM from the build
Remove BEAGLEBOARDXM kernel (supported by GENERIC now)

Handle different register layout on OMAP3

Add omapfb to FDT-ized TI port.

Use dss as console on Nokia N900.

Enable IRQ status bits for omap3 type and set speed properly

Add RTC support

Remove tps65950pm (hardware now supported by twl4030.c)

Add NAND flash support.

Add tigpmc, omapnand

Attach tiusb before the default pass since it adds a bus to reduce kernel output
Replace tps65950pm with twl (the former has been removed)

Fix non-FDT build

Cleanup and remove dependency on arch/arm/omap

Add support for GPIO interrupts and fix reading the state of output pins.
Match smsc,lan9115 and honour local-mac-address/mac-address properties

Only one instance of twl(4) is needed
Remove OVERO from build, and commented out N900 kernel config
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.

Remove commented out IGEPV2 entry

OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.

No longer used.

Also match ti,omap2-onenand

Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context

Add driver for NXP TDA19988 HDMI encoder

Add support for AM335x display controller (LCDC).

Add tdahdmi, tilcdc, tifb

Test DRM_MODE_* flags, not VID_*

Comment out mode fixup (not needed it seems)

Use 297MHz for display clock

Select closest rate to desired pixel clock

Speed up mode setting a bit and turn off the display while changing modes
 1.12.2.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.15.8.1  03-Apr-2021  thorpej Sync with HEAD.
 1.18.2.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.19.8.1  04-Aug-2021  thorpej Adapt to CFARGS().
 1.19.2.1  08-May-2021  thorpej ia->ia_cookie -> devhandle_to_of(device_handle(self))
 1.20.2.1  09-Aug-2021  thorpej Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,
which is based on a newer HEAD revision.

RSS XML Feed