/openbmc/linux/drivers/rtc/ |
H A D | rtc-jz4740.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de> 9 #include <linux/clk-provider.h> 75 return readl(rtc->base + reg); in jz4740_rtc_reg_read() 82 return readl_poll_timeout(rtc->base + JZ_REG_RTC_CTRL, ctrl, in jz4740_rtc_wait_write_ready() 95 writel(JZ_RTC_WENR_MAGIC, rtc->base + JZ_REG_RTC_WENR); in jz4780_rtc_enable_write() 97 return readl_poll_timeout(rtc->base + JZ_REG_RTC_WENR, ctrl, in jz4780_rtc_enable_write() 106 if (rtc->type >= ID_JZ4760) in jz4740_rtc_reg_write() 111 writel(val, rtc->base + reg); in jz4740_rtc_reg_write() 123 spin_lock_irqsave(&rtc->lock, flags); in jz4740_rtc_ctrl_set_bits() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/input/ |
H A D | iqs626a.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Jeff LaBundy <jeff@labundy.com> 13 The Azoteq IQS626A is a 14-channel capacitive touch controller that features 14 additional Hall-effect and inductive sensing capabilities. 19 - $ref: touchscreen/touchscreen.yaml# 31 "#address-cells": 34 "#size-cells": 37 azoteq,suspend-mode: [all …]
|
H A D | azoteq,iqs7222.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Jeff LaBundy <jeff@labundy.com> 21 - azoteq,iqs7222a 22 - azoteq,iqs7222b 23 - azoteq,iqs7222c 24 - azoteq,iqs7222d 29 irq-gpios: 32 Specifies the GPIO connected to the device's active-low RDY output. [all …]
|
H A D | iqs269a.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Jeff LaBundy <jeff@labundy.com> 13 The Azoteq IQS269A is an 8-channel capacitive touch controller that features 14 additional Hall-effect and inductive sensing capabilities. 28 "#address-cells": 31 "#size-cells": 34 azoteq,hall-enable: 37 Enables Hall-effect sensing on channels 6 and 7. In this case, keycodes [all …]
|
/openbmc/linux/drivers/phy/intel/ |
H A D | phy-intel-lgm-emmc.c | 1 // SPDX-License-Identifier: GPL-2.0 57 unsigned long rate; in intel_emmc_phy_power() local 64 ret = regmap_update_bits(priv->syscfg, EMMC_PHYCTRL1_REG, PDB_MASK, in intel_emmc_phy_power() 67 dev_err(&phy->dev, "CALIO power down bar failed: %d\n", ret); in intel_emmc_phy_power() 75 rate = clk_get_rate(priv->emmcclk); in intel_emmc_phy_power() 76 quot = DIV_ROUND_CLOSEST(rate, 50000000); in intel_emmc_phy_power() 78 dev_warn(&phy->dev, "Unsupported rate: %lu\n", rate); in intel_emmc_phy_power() 88 ret = regmap_update_bits(priv->syscfg, EMMC_PHYCTRL1_REG, PDB_MASK, in intel_emmc_phy_power() 91 dev_err(&phy->dev, "CALIO power down bar failed: %d\n", ret); in intel_emmc_phy_power() 102 ret = regmap_read_poll_timeout(priv->syscfg, EMMC_PHYSTAT_REG, in intel_emmc_phy_power() [all …]
|
H A D | phy-intel-keembay-emmc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 66 ret = regmap_update_bits(priv->syscfg, PHY_CFG_0, PWR_DOWN_MASK, in keembay_emmc_phy_power() 69 dev_err(&phy->dev, "CALIO power down bar failed: %d\n", ret); in keembay_emmc_phy_power() 73 ret = regmap_update_bits(priv->syscfg, PHY_CFG_0, DLL_EN_MASK, in keembay_emmc_phy_power() 76 dev_err(&phy->dev, "turn off the dll failed: %d\n", ret); in keembay_emmc_phy_power() 84 mhz = DIV_ROUND_CLOSEST(clk_get_rate(priv->emmcclk), 1000000); in keembay_emmc_phy_power() 98 /* Check for EMMC clock rate*/ in keembay_emmc_phy_power() 100 dev_warn(&phy->dev, "Unsupported rate: %d MHz\n", mhz); in keembay_emmc_phy_power() 109 ret = regmap_update_bits(priv->syscfg, PHY_CFG_0, PWR_DOWN_MASK, in keembay_emmc_phy_power() 112 dev_err(&phy->dev, "CALIO power down bar failed: %d\n", ret); in keembay_emmc_phy_power() [all …]
|
/openbmc/linux/drivers/clocksource/ |
H A D | timer-tegra.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #define pr_fmt(fmt) "tegra-timer: " fmt 24 #include "timer-of.h" 68 writel_relaxed(TIMER_PTV_EN | (cycles - 1), reg_base + TIMER_PTV); in tegra_timer_set_next_event() 87 writel_relaxed(TIMER_PTV_EN | TIMER_PTV_PER | (period - 1), in tegra_timer_set_periodic() 99 evt->event_handler(evt); in tegra_timer_isr() 139 irq_force_affinity(to->clkevt.irq, cpumask_of(cpu)); in tegra_timer_setup() 140 enable_irq(to->clkevt.irq); in tegra_timer_setup() 150 clockevents_config_and_register(&to->clkevt, timer_of_rate(to), in tegra_timer_setup() 161 to->clkevt.set_state_shutdown(&to->clkevt); in tegra_timer_stop() [all …]
|
H A D | timer-ti-dm-systimer.c | 1 // SPDX-License-Identifier: GPL-2.0+ 15 #include <linux/clk/clk-conf.h> 17 #include <clocksource/timer-ti-dm.h> 18 #include <dt-bindings/bus/ti-sysc.h> 50 unsigned long rate; member 68 u32 tidr = readl_relaxed(t->base); in dmtimer_systimer_revision1() 82 writel_relaxed(val, t->base + t->sysc); in dmtimer_systimer_enable() 90 writel_relaxed(DMTIMER_TYPE1_DISABLE, t->base + t->sysc); in dmtimer_systimer_disable() 95 void __iomem *syss = t->base + OMAP_TIMER_V1_SYS_STAT_OFFSET; in dmtimer_systimer_type1_reset() 100 writel_relaxed(BIT(1) | BIT(2), t->base + t->ifctrl); in dmtimer_systimer_type1_reset() [all …]
|
/openbmc/linux/drivers/clk/rockchip/ |
H A D | clk.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 7 * Author: Xing Zheng <zhengxing@rock-chips.com> 21 #include <linux/clk-provider.h> 295 .rate = _rate##U, \ 306 .rate = _rate##U, \ 315 .rate = _rate##U, \ 324 .rate = _rate##U, \ 332 * struct rockchip_clk_provider - information about clock provider 335 * @cru_node: device-node of the clock-provider 336 * @grf: regmap of the general-register-files syscon [all …]
|
/openbmc/linux/sound/soc/codecs/ |
H A D | ak4642.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // ak4642.c -- AK4642/AK4643 ALSA Soc Audio driver 23 #include <linux/clk-provider.h> 85 #define MS (1 << 3) /* master/slave select */ macro 102 #define LOPS (1 << 6) /* Stero Line-out Power Save Mode */ 153 * min : 0xFE : -115.0 dB 156 static const DECLARE_TLV_DB_SCALE(out_tlv, -11550, 50, 1); 177 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in ak4642_lout_event() 280 int is_play = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; in ak4642_dai_startup() 281 struct snd_soc_component *component = dai->component; in ak4642_dai_startup() [all …]
|
H A D | sta350.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Codec driver for ST STA350 2.1-channel high-efficiency digital audio system 35 #include <sound/soc-dapm.h> 55 /* Power-up register defaults */ 156 "vdd-dig", /* digital supply, 3.3V */ 157 "vdd-pll", /* pll supply, 3.3V */ 158 "vcc" /* power amp supply, 5V - 26V */ 179 static const DECLARE_TLV_DB_SCALE(mvol_tlv, -12750, 50, 1); 180 static const DECLARE_TLV_DB_SCALE(chvol_tlv, -7950, 50, 1); 181 static const DECLARE_TLV_DB_SCALE(tone_tlv, -1200, 200, 0); [all …]
|
H A D | sta32x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Codec driver for ST STA32x 2.1-channel high-efficiency digital audio system 35 #include <sound/soc-dapm.h> 55 /* Power-up register defaults */ 133 "Vcc" /* power amp spply, 10V - 36V */ 154 static const DECLARE_TLV_DB_SCALE(mvol_tlv, -12700, 50, 1); 155 static const DECLARE_TLV_DB_SCALE(chvol_tlv, -7950, 50, 1); 156 static const DECLARE_TLV_DB_SCALE(tone_tlv, -120, 200, 0); 159 "Anti-Clipping", "Dynamic Range Compression" }; 170 "Hard", "Party", "Vocal", "Hip-Hop", "Dialog", "Bass-boost #1", [all …]
|
H A D | cs42l56.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * cs42l56.c -- CS42L56 ALSA SoC audio driver 29 #include <sound/soc-dapm.h> 63 { 3, 0x7f }, /* r03 - Power Ctl 1 */ 64 { 4, 0xff }, /* r04 - Power Ctl 2 */ 65 { 5, 0x00 }, /* ro5 - Clocking Ctl 1 */ 66 { 6, 0x0b }, /* r06 - Clocking Ctl 2 */ 67 { 7, 0x00 }, /* r07 - Serial Format */ 68 { 8, 0x05 }, /* r08 - Class H Ctl */ 69 { 9, 0x0c }, /* r09 - Misc Ctl */ [all …]
|
H A D | da7218.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * da7218.c - DA7218 ALSA SoC Codec Driver 22 #include <sound/soc-dapm.h> 37 static const DECLARE_TLV_DB_SCALE(da7218_mic_gain_tlv, -600, 600, 0); 38 static const DECLARE_TLV_DB_SCALE(da7218_mixin_gain_tlv, -450, 150, 0); 39 static const DECLARE_TLV_DB_SCALE(da7218_in_dig_gain_tlv, -8325, 75, 0); 40 static const DECLARE_TLV_DB_SCALE(da7218_ags_trigger_tlv, -9000, 600, 0); 42 static const DECLARE_TLV_DB_SCALE(da7218_alc_threshold_tlv, -9450, 150, 0); 47 static const DECLARE_TLV_DB_SCALE(da7218_dmix_gain_tlv, -4200, 150, 0); 50 static const DECLARE_TLV_DB_SCALE(da7218_dgs_trigger_tlv, -9450, 150, 0); [all …]
|
H A D | tlv320aic3x.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 * --------------------------------------- 17 * MONO_LOUT -> N/A | MONO_LOUT -> N/A 18 * | IN1L -> LINE1L 19 * | IN1R -> LINE1R 20 * | IN2L -> LINE2L 21 * | IN2R -> LINE2R 22 * | MIC3L/R -> N/A 25 * --------------------------------------- 89 /* Output Common-Mode Voltage */ [all …]
|
H A D | cs35l36.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // cs35l36.c -- CS35L36 ALSA SoC audio driver 27 #include <sound/soc-dapm.h> 448 TLV_DB_MINMAX_ITEM(-10200, 1200)); 452 "Off", ".5ms", "1ms", "2ms", "4ms", "8ms", "15ms", "30ms"}; 465 ucontrol->value.integer.value[0] = cs35l36->ldm_mode_sel; in cs35l36_ldm_sel_get() 477 int val = (ucontrol->value.integer.value[0]) ? CS35L36_NG_AMP_EN_MASK : in cs35l36_ldm_sel_put() 480 cs35l36->ldm_mode_sel = val; in cs35l36_ldm_sel_put() 482 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_ldm_sel_put() 494 SOC_SINGLE("Amp Gain Zero-Cross Switch", CS35L36_AMP_GAIN_CTRL, [all …]
|
H A D | da7219.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * da7219.c - DA7219 ALSA SoC Codec Driver 13 #include <linux/clk-provider.h> 26 #include <sound/soc-dapm.h> 33 #include "da7219-aad.h" 41 static const DECLARE_TLV_DB_SCALE(da7219_mic_gain_tlv, -600, 600, 0); 42 static const DECLARE_TLV_DB_SCALE(da7219_mixin_gain_tlv, -450, 150, 0); 43 static const DECLARE_TLV_DB_SCALE(da7219_adc_dig_gain_tlv, -8325, 75, 0); 44 static const DECLARE_TLV_DB_SCALE(da7219_alc_threshold_tlv, -9450, 150, 0); 47 static const DECLARE_TLV_DB_SCALE(da7219_sidetone_gain_tlv, -4200, 300, 0); [all …]
|
H A D | arizona.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * arizona.c - Wolfson Arizona class device shared support 67 dev_err(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__) 69 dev_warn(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__) 71 dev_dbg(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__) 74 dev_err(_dai->dev, "AIF%d: " fmt, _dai->id, ##__VA_ARGS__) 76 dev_warn(_dai->dev, "AIF%d: " fmt, _dai->id, ##__VA_ARGS__) 78 dev_dbg(_dai->dev, "AIF%d: " fmt, _dai->id, ##__VA_ARGS__) 84 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in arizona_spk_ev() 85 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in arizona_spk_ev() [all …]
|
/openbmc/linux/drivers/usb/misc/ |
H A D | usb3503.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Copyright (c) 2012-2013 Dongjin Kim (tobetter@gmail.com) 58 struct device *dev = hub->dev; in usb3503_connect() 61 if (hub->regmap) { in usb3503_connect() 63 err = regmap_write(hub->regmap, USB3503_SP_ILOCK, in usb3503_connect() 71 /* PDS : Set the ports which are disabled in self-powered mode. */ in usb3503_connect() 72 if (hub->port_off_mask) { in usb3503_connect() 73 err = regmap_update_bits(hub->regmap, USB3503_PDS, in usb3503_connect() 74 hub->port_off_mask, in usb3503_connect() 75 hub->port_off_mask); in usb3503_connect() [all …]
|
/openbmc/linux/drivers/watchdog/ |
H A D | qcom-wdt.c | 1 // SPDX-License-Identifier: GPL-2.0-only 48 unsigned long rate; member 55 return wdt->base + wdt->layout[reg]; in wdt_addr() 76 unsigned int bark = wdd->timeout - wdd->pretimeout; in qcom_wdt_start() 80 writel(bark * wdt->rate, wdt_addr(wdt, WDT_BARK_TIME)); in qcom_wdt_start() 81 writel(wdd->timeout * wdt->rate, wdt_addr(wdt, WDT_BITE_TIME)); in qcom_wdt_start() 105 wdd->timeout = timeout; in qcom_wdt_set_timeout() 112 wdd->pretimeout = timeout; in qcom_wdt_set_pretimeout() 124 * Setup BITE_TIME to be 128ms, and enable WDT. in qcom_wdt_restart() 126 timeout = 128 * wdt->rate / 1000; in qcom_wdt_restart() [all …]
|
/openbmc/linux/drivers/tty/serial/8250/ |
H A D | 8250_of.c | 1 // SPDX-License-Identifier: GPL-2.0+ 36 struct device_node *np = ofdev->dev.of_node; in of_platform_serial_setup() local 37 struct uart_port *port = &up->port; in of_platform_serial_setup() 43 pm_runtime_enable(&ofdev->dev); in of_platform_serial_setup() 44 pm_runtime_get_sync(&ofdev->dev); in of_platform_serial_setup() 46 if (of_property_read_u32(np, "clock-frequency", &clk)) { in of_platform_serial_setup() 48 /* Get clk rate through clk driver if present */ in of_platform_serial_setup() 49 info->clk = devm_clk_get(&ofdev->dev, NULL); in of_platform_serial_setup() 50 if (IS_ERR(info->clk)) { in of_platform_serial_setup() 51 ret = PTR_ERR(info->clk); in of_platform_serial_setup() [all …]
|
/openbmc/linux/sound/soc/stm/ |
H A D | stm32_sai_sub.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved 10 #include <linux/clk-provider.h> 41 #define STM_SAI_IS_PLAYBACK(ip) ((ip)->dir == SNDRV_PCM_STREAM_PLAYBACK) 42 #define STM_SAI_IS_CAPTURE(ip) ((ip)->dir == SNDRV_PCM_STREAM_CAPTURE) 47 #define STM_SAI_IS_SUB_A(x) ((x)->id == STM_SAI_A_ID) 53 #define STM_SAI_PROTOCOL_IS_SPDIF(ip) ((ip)->spdif) 54 #define STM_SAI_HAS_SPDIF(x) ((x)->pdata->conf.has_spdif_pdm) 55 #define STM_SAI_HAS_PDM(x) ((x)->pdata->conf.has_spdif_pdm) 56 #define STM_SAI_HAS_EXT_SYNC(x) (!STM_SAI_IS_F4(sai->pdata)) [all …]
|
/openbmc/linux/drivers/clk/ |
H A D | clk-aspeed.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 #define pr_fmt(fmt) "clk-aspeed: " fmt 13 #include <dt-bindings/clock/aspeed-clock.h> 15 #include "clk-aspeed.h" 49 [ASPEED_CLK_GATE_ECLK] = { 0, 6, "eclk-gate", "eclk", 0 }, /* Video Engine */ 50 [ASPEED_CLK_GATE_GCLK] = { 1, 7, "gclk-gate", NULL, 0 }, /* 2D engine */ 51 [ASPEED_CLK_GATE_MCLK] = { 2, -1, "mclk-gate", "mpll", CLK_IS_CRITICAL }, /* SDRAM */ 52 [ASPEED_CLK_GATE_VCLK] = { 3, -1, "vclk-gate", NULL, 0 }, /* Video Capture */ 53 [ASPEED_CLK_GATE_BCLK] = { 4, 8, "bclk-gate", "bclk", CLK_IS_CRITICAL }, /* PCIe/PCI */ 54 [ASPEED_CLK_GATE_DCLK] = { 5, -1, "dclk-gate", NULL, CLK_IS_CRITICAL }, /* DAC */ [all …]
|
/openbmc/linux/drivers/clk/mvebu/ |
H A D | armada-37xx-periph.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Gregory CLEMENT <gregory.clement@free-electrons.com> 11 * TBG-A-P --| | | | | | ______ 12 * TBG-B-P --| Mux |--| /div1 |--| /div2 |--| Gate |--> perip_clk 13 * TBG-A-S --| | | | | | |______| 14 * TBG-B-S --|_____| |_______| |_______| 20 #include <linux/clk-provider.h> 201 .parent_names = (const char *[]){ "TBG-A-P", \ 202 "TBG-B-P", "TBG-A-S", "TBG-B-S"}, \ 211 .parent_names = (const char *[]){ "TBG-A-P", \ [all …]
|
/openbmc/linux/drivers/i2c/busses/ |
H A D | i2c-ocores.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * i2c-ocores.c: I2C bus driver for OpenCores I2C controller 22 #include <linux/platform_data/i2c-ocores.h> 87 #define OCORES_FLAG_BROKEN_IRQ BIT(1) /* Broken IRQ for FU540-C000 SoC */ 91 iowrite8(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_8() 96 iowrite16(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_16() 101 iowrite32(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_32() 106 iowrite16be(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_16be() 111 iowrite32be(value, i2c->base + (reg << i2c->reg_shift)); in oc_setreg_32be() 116 return ioread8(i2c->base + (reg << i2c->reg_shift)); in oc_getreg_8() [all …]
|