zephyr/drivers
Rubin Gerritsen f0a433fc03 drivers: clock_control: nrf2_lfclk: Fix selecting lowest power clock
The application or drivers can request the LFCLK with a given
precision and accuracy.
The driver should select the clock source which has
the lowest power consumption and still satisfies the requested
accuracy and precision.

Before this commit, this was not the case.
Consider the case where the BICR has configured the system
to have LFXO with accuracy of 20 ppm.
The existing code would have ordered the clock options as following:
```
[0] = {LFLPRC, 1000 ppm},
[1] = {LFRC, 500 ppm},
[2] = {SYNTH, 30 ppm},
[3] = {LFXO_PIERCE, 20 ppm},
[4] = {LFXO_PIERCE_HP, 20 ppm}
```

**Example 1**: The user requests the clock with an accuracy of 30 ppm.
The existing code would request the power hungry "SYNTH".

**Example 2**: The user requests a clock with an accuracy of 500 ppm.
The existing code would request the LFRC which consumes more power than
the LFXO.

This commit fixes this issue by ordering the clock sources according
to power consumption.
For the examples above we user request would result in requesting the
20 ppm LFXO.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-06-05 15:16:28 -05:00
..
adc drivers: adc: nrf: align to non-gain configuration 2025-06-04 17:03:48 +02:00
audio
auxdisplay
bbram
bluetooth
cache
can drivers: can: mcp2515: reformat files using clang-format 2025-06-02 13:29:17 +02:00
charger charger: axp2101: Guards against out-of-bounds read 2025-05-28 12:22:21 +02:00
clock_control drivers: clock_control: nrf2_lfclk: Fix selecting lowest power clock 2025-06-05 15:16:28 -05:00
comparator dts: enum_macros: make sure that they are lowercase 2025-05-28 17:48:57 +02:00
console
coredump
counter drivers/counter: implement it51xxx counter driver 2025-06-05 12:33:29 +02:00
crypto
dac
dai drivers: ssp: unify clock selection flow across ACE platforms 2025-05-31 07:03:39 -04:00
disk
display drivers: display: ssd1306: fix reset 2025-05-28 01:47:24 +02:00
dma drivers: dma: esp32: guard driver's kconfig options 2025-06-03 09:15:28 +02:00
dp
edac
eeprom
entropy drivers: entropy: add driver for VirtIO Entropy device 2025-06-05 09:33:59 +02:00
espi drivers/espi: ite: Refactor register defines into .c for SoC flexibility 2025-06-05 09:34:23 +02:00
ethernet drivers: enet: eth_nxp_enet_qos_mac: handle errors in RX queue worker 2025-06-02 22:10:27 +02:00
firmware drivers: firmware: add IRONside boot report 2025-05-30 16:35:15 +02:00
flash drivers: flash: mcux: fix read for LPC55XXX 2025-06-04 08:45:56 +02:00
fpga
fuel_gauge
gnss gnss: u_blox_f9p: Introduce High-precision GNSS module 2025-06-04 08:44:59 +02:00
gpio drivers: gpio: Add support for RZ/V2H 2025-06-04 17:00:01 +02:00
haptics
hdlc_rcp_if
hwinfo
hwspinlock
i2c i2c: npcx_i2c_ctrl_transfer does not match original declaration 2025-06-05 15:11:14 -05:00
i2s drivers: i2s: Add support for nRF TDM peripherals 2025-06-02 13:29:10 +02:00
i3c drivers: i3c: fix adv_info_get ret code 2025-05-31 07:06:13 -04:00
ieee802154 drivers: ieee802154: added raw mode to mcxw ieee802154 driver 2025-05-29 23:25:41 +02:00
input drivers: input: cap12xx Fix integer overflow warning 2025-05-28 01:48:22 +02:00
interrupt_controller drivers: intc: esp32: Disable IRQ before connect 2025-06-05 15:10:44 -05:00
ipm driver: ipm: introduce IPM_MAX_DATA_SIZE build configuration 2025-05-27 10:29:20 +02:00
led
led_strip
lora
mbox
mdio
memc
mfd drivers: mfd: add FLEXCOM drivers for Microchip SAM devices 2025-05-28 08:14:08 +02:00
mipi_dbi pm: policy: remove redundant ifdef exclusion of device_power_lock 2025-06-05 09:34:31 +02:00
mipi_dsi
misc drivers: misc: nordic_vpr_launcher: move SoC-specific config to DT 2025-05-29 15:16:52 +01:00
mm
modem modem_cellular: Add support for the simcom a76xx modem 2025-05-28 16:37:53 +02:00
mspi
net
pcie
peci
pinctrl drivers: pinctrl: nrf: Add support for TDM peripheral 2025-06-02 13:29:10 +02:00
pm_cpu_ops
power_domain
ps2
ptp_clock
pwm drivers: pwm: ledc: esp32: Enable RC_FAST clock source 2025-06-05 15:09:17 -05:00
regulator
reset
retained_mem
rtc drivers: rtc: pcf8563: fix get alarm time 2025-05-28 05:54:49 +02:00
sdhc drivers: Update dtc transfer info alignment 2025-05-30 10:26:34 +02:00
sensor drivers: sensor: renesas: Fix unchecked return value in hs400x 2025-06-05 12:34:01 +02:00
serial drivers: serial: Add support for Renesas RZ/V2H 2025-06-04 17:00:01 +02:00
sip_svc
smbus
spi drivers: spi_context: Fix spi_context_xx_len_left 2025-06-04 16:11:45 -04:00
stepper drivers: stepper: tmc50xx: add a null pointer check 2025-06-04 17:04:30 +02:00
syscon
tee
timer drivers/timer/it51xxx: remove not used timer 2025-06-05 12:33:29 +02:00
usb drivers: udc_dwc2: Execute post enable quirk after enable 2025-06-03 13:50:55 +02:00
usb_c drivers: tcpc: Add TCPC driver for FUSB307 2025-05-27 11:50:29 +02:00
video video: introduction of driver for Omnivision OV9655 2025-06-04 15:50:24 -04:00
virtio virtio: add API for VIRTIO devices and add VIRTIO PCI driver 2025-06-02 17:37:07 +02:00
virtualization
w1
watchdog soc: espressif: convert rtc peripheral to clock subsystem 2025-06-02 17:38:08 +02:00
wifi drivers: wifi: siwx91x: Handling data packets for AP mode 2025-06-04 15:51:07 -04:00
xen
CMakeLists.txt virtio: add API for VIRTIO devices and add VIRTIO PCI driver 2025-06-02 17:37:07 +02:00
Kconfig virtio: add API for VIRTIO devices and add VIRTIO PCI driver 2025-06-02 17:37:07 +02:00