Home
last modified time | relevance | path

Searched +full:clock +full:- +full:presc (Results 1 – 8 of 8) sorted by relevance

/Linux-v6.6/drivers/pwm/
Dpwm-stm32-lp.c1 // SPDX-License-Identifier: GPL-2.0
3 * STM32 Low-Power Timer PWM driver
9 * Inspired by Gerald Baeza's pwm-stm32 driver
13 #include <linux/mfd/stm32-lptimer.h>
31 /* STM32 Low-Power Timer is preceded by a configurable power-of-2 prescaler */
40 u32 val, mask, cfgr, presc = 0; in stm32_pwm_lp_apply() local
47 if (!state->enabled) { in stm32_pwm_lp_apply()
50 ret = regmap_write(priv->regmap, STM32_LPTIM_CR, 0); in stm32_pwm_lp_apply()
53 /* disable clock to PWM counter */ in stm32_pwm_lp_apply()
54 clk_disable(priv->clk); in stm32_pwm_lp_apply()
[all …]
/Linux-v6.6/drivers/watchdog/
Dstm32_iwdg.c1 // SPDX-License-Identifier: GPL-2.0
89 u32 tout, presc, iwdg_rlr, iwdg_pr, iwdg_sr; in stm32_iwdg_start() local
92 dev_dbg(wdd->parent, "%s\n", __func__); in stm32_iwdg_start()
94 tout = clamp_t(unsigned int, wdd->timeout, in stm32_iwdg_start()
95 wdd->min_timeout, wdd->max_hw_heartbeat_ms / 1000); in stm32_iwdg_start()
97 presc = DIV_ROUND_UP(tout * wdt->rate, RLR_MAX + 1); in stm32_iwdg_start()
100 presc = roundup_pow_of_two(presc); in stm32_iwdg_start()
101 iwdg_pr = presc <= 1 << PR_SHIFT ? 0 : ilog2(presc) - PR_SHIFT; in stm32_iwdg_start()
102 iwdg_rlr = ((tout * wdt->rate) / presc) - 1; in stm32_iwdg_start()
105 reg_write(wdt->regs, IWDG_KR, KR_KEY_EWA); in stm32_iwdg_start()
[all …]
/Linux-v6.6/drivers/media/dvb-frontends/
Dstv6110.c1 // SPDX-License-Identifier: GPL-2.0-or-later
43 return a - b; in abssub()
45 return b - a; in abssub()
50 kfree(fe->tuner_priv); in stv6110_release()
51 fe->tuner_priv = NULL; in stv6110_release()
57 struct stv6110_priv *priv = fe->tuner_priv; in stv6110_write_regs()
61 .addr = priv->i2c_address, in stv6110_write_regs()
73 return -EINVAL; in stv6110_write_regs()
77 return -EINVAL; in stv6110_write_regs()
82 if (fe->ops.i2c_gate_ctrl) in stv6110_write_regs()
[all …]
/Linux-v6.6/drivers/iio/adc/
Dstm32-adc-core.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved
8 * Inspired from: fsl-imx25-tsadc
29 #include "stm32-adc-core.h"
45 * struct stm32_adc_common_regs - stm32 common registers
65 * struct stm32_adc_priv_cfg - stm32 core compatible configuration data
67 * @clk_sel: clock selection routine
68 * @max_clk_rate_hz: maximum analog clock rate (Hz, from datasheet)
85 * struct stm32_adc_priv - stm32 ADC core private data
89 * @aclk: clock reference for the analog circuitry
[all …]
/Linux-v6.6/drivers/media/i2c/
Ddw9768.c1 // SPDX-License-Identifier: GPL-2.0
9 #include <media/v4l2-async.h>
10 #include <media/v4l2-ctrls.h>
11 #include <media/v4l2-device.h>
12 #include <media/v4l2-fwnode.h>
13 #include <media/v4l2-subdev.h>
16 #define DW9768_MAX_FOCUS_POS (1024 - 1)
56 * Bit[2:0] Namely PRESC[2:0], set the internal clock dividing rate as follow.
70 * Bit[5:0] Defined as VCM rising periodic time (Tvib) together with PRESC[2:0]
72 * Dividing Rate is the internal clock dividing rate that is defined at
[all …]
/Linux-v6.6/Documentation/devicetree/bindings/media/i2c/
Ddongwoon,dw9768.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
4 ---
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
11 - Dongchun Zhu <dongchun.zhu@mediatek.com>
13 description: |-
14 The Dongwoon DW9768 is a single 10-bit digital-to-analog (DAC) converter
16 a linear mode driver. The DAC is controlled via a 2-wire (I2C-compatible)
17 serial interface that operates at clock rates up to 1MHz. This chip
24 - dongwoon,dw9768 # for DW9768 VCM
25 - giantec,gt9769 # for GT9769 VCM
[all …]
/Linux-v6.6/drivers/i2c/busses/
Di2c-stm32f7.c1 // SPDX-License-Identifier: GPL-2.0
14 * This driver is based on i2c-stm32f4.c
21 #include <linux/i2c-smbus.h>
38 #include "i2c-stm32.h"
185 * struct stm32f7_i2c_regs - i2c f7 registers backup
201 * struct stm32f7_i2c_spec - private i2c specification timing
208 * @l_min: Min low period of the SCL clock (ns)
209 * @h_min: Min high period of the SCL clock (ns)
223 * struct stm32f7_i2c_setup - private I2C timing setup parameters
225 * @clock_src: I2C clock source frequency (Hz)
[all …]
/Linux-v6.6/drivers/spi/
Dspi-stm32-qspi.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) STMicroelectronics 2018 - All Rights Reserved
9 #include <linux/dma-mapping.h>
23 #include <linux/spi/spi-mem.h>
93 #define STM32_AUTOSUSPEND_DELAY -1
97 u32 presc; member
134 cr = readl_relaxed(qspi->io_base + QSPI_CR); in stm32_qspi_irq()
135 sr = readl_relaxed(qspi->io_base + QSPI_SR); in stm32_qspi_irq()
140 writel_relaxed(cr, qspi->io_base + QSPI_CR); in stm32_qspi_irq()
141 complete(&qspi->match_completion); in stm32_qspi_irq()
[all …]