pwm 165 arch/arm/mach-iop32x/glantank.c .pwm = { 255, 255 }, pwm 198 arch/arm/mach-iop32x/n2100.c .pwm = { 255, 255 }, pwm 246 arch/arm/mach-iop32x/n2100.c .pwm = { 0, 0 }, pwm 111 arch/powerpc/include/asm/mpc52xx.h u32 pwm; /* GPTx + 0x08 */ pwm 32 drivers/bus/ts-nbus.c struct pwm_device *pwm; pwm 278 drivers/bus/ts-nbus.c struct pwm_device *pwm; pwm 294 drivers/bus/ts-nbus.c pwm = devm_pwm_get(dev, NULL); pwm 295 drivers/bus/ts-nbus.c if (IS_ERR(pwm)) { pwm 296 drivers/bus/ts-nbus.c ret = PTR_ERR(pwm); pwm 302 drivers/bus/ts-nbus.c pwm_get_args(pwm, &pargs); pwm 312 drivers/bus/ts-nbus.c pwm_apply_args(pwm); pwm 313 drivers/bus/ts-nbus.c ret = pwm_config(pwm, pargs.period, pargs.period); pwm 320 drivers/bus/ts-nbus.c pwm_enable(pwm); pwm 321 drivers/bus/ts-nbus.c ts_nbus->pwm = pwm; pwm 343 drivers/bus/ts-nbus.c pwm_disable(ts_nbus->pwm); pwm 334 drivers/clk/bcm/clk-bcm281xx.c KONA_CLK(slave, pwm, peri), pwm 16 drivers/clk/clk-pwm.c struct pwm_device *pwm; pwm 29 drivers/clk/clk-pwm.c return pwm_enable(clk_pwm->pwm); pwm 36 drivers/clk/clk-pwm.c pwm_disable(clk_pwm->pwm); pwm 52 drivers/clk/clk-pwm.c pwm_get_state(clk_pwm->pwm, &state); pwm 72 drivers/clk/clk-pwm.c struct pwm_device *pwm; pwm 81 drivers/clk/clk-pwm.c pwm = devm_pwm_get(&pdev->dev, NULL); pwm 82 drivers/clk/clk-pwm.c if (IS_ERR(pwm)) pwm 83 drivers/clk/clk-pwm.c return PTR_ERR(pwm); pwm 85 drivers/clk/clk-pwm.c pwm_get_args(pwm, &pargs); pwm 105 drivers/clk/clk-pwm.c pwm_apply_args(pwm); pwm 106 drivers/clk/clk-pwm.c ret = pwm_config(pwm, (pargs.period + 1) >> 1, pargs.period); pwm 118 drivers/clk/clk-pwm.c clk_pwm->pwm = pwm; pwm 97 drivers/clk/davinci/psc-da830.c LPSC(17, 0, pwm, pll0_sysclk2, pwm_clkdev, 0), pwm 260 drivers/clk/mvebu/armada-37xx-periph.c PERIPH_CLK_FULL_DD(pwm, 13, 14, DIV_SEL0, DIV_SEL0, 3, 0); pwm 280 drivers/clk/mvebu/armada-37xx-periph.c REF_CLK_FULL_DD(pwm), pwm 142 drivers/clk/mxs/clk-imx23.c clks[pwm] = mxs_clk_gate("pwm", "ref_xtal", XTAL, 29); pwm 211 drivers/clk/mxs/clk-imx28.c clks[pwm] = mxs_clk_gate("pwm", "ref_xtal", XTAL, 29); pwm 80 drivers/clocksource/samsung_pwm_timer.c static struct samsung_pwm_clocksource pwm; pwm 93 drivers/clocksource/samsung_pwm_timer.c reg = readl(pwm.base + REG_TCFG0); pwm 96 drivers/clocksource/samsung_pwm_timer.c writel(reg, pwm.base + REG_TCFG0); pwm 108 drivers/clocksource/samsung_pwm_timer.c bits = (fls(divisor) - 1) - pwm.variant.div_base; pwm 112 drivers/clocksource/samsung_pwm_timer.c reg = readl(pwm.base + REG_TCFG1); pwm 115 drivers/clocksource/samsung_pwm_timer.c writel(reg, pwm.base + REG_TCFG1); pwm 130 drivers/clocksource/samsung_pwm_timer.c tcon = readl_relaxed(pwm.base + REG_TCON); pwm 132 drivers/clocksource/samsung_pwm_timer.c writel_relaxed(tcon, pwm.base + REG_TCON); pwm 148 drivers/clocksource/samsung_pwm_timer.c tcon = readl_relaxed(pwm.base + REG_TCON); pwm 153 drivers/clocksource/samsung_pwm_timer.c writel_relaxed(tcnt, pwm.base + REG_TCNTB(channel)); pwm 154 drivers/clocksource/samsung_pwm_timer.c writel_relaxed(tcnt, pwm.base + REG_TCMPB(channel)); pwm 155 drivers/clocksource/samsung_pwm_timer.c writel_relaxed(tcon, pwm.base + REG_TCON); pwm 170 drivers/clocksource/samsung_pwm_timer.c tcon = readl_relaxed(pwm.base + REG_TCON); pwm 180 drivers/clocksource/samsung_pwm_timer.c writel_relaxed(tcon, pwm.base + REG_TCON); pwm 201 drivers/clocksource/samsung_pwm_timer.c samsung_time_setup(pwm.event_id, cycles); pwm 202 drivers/clocksource/samsung_pwm_timer.c samsung_time_start(pwm.event_id, false); pwm 209 drivers/clocksource/samsung_pwm_timer.c samsung_time_stop(pwm.event_id); pwm 215 drivers/clocksource/samsung_pwm_timer.c samsung_time_stop(pwm.event_id); pwm 216 drivers/clocksource/samsung_pwm_timer.c samsung_time_setup(pwm.event_id, pwm.clock_count_per_tick - 1); pwm 217 drivers/clocksource/samsung_pwm_timer.c samsung_time_start(pwm.event_id, true); pwm 223 drivers/clocksource/samsung_pwm_timer.c samsung_timer_set_prescale(pwm.event_id, pwm.tscaler_div); pwm 224 drivers/clocksource/samsung_pwm_timer.c samsung_timer_set_divisor(pwm.event_id, pwm.tdiv); pwm 226 drivers/clocksource/samsung_pwm_timer.c if (pwm.variant.has_tint_cstat) { pwm 227 drivers/clocksource/samsung_pwm_timer.c u32 mask = (1 << pwm.event_id); pwm 228 drivers/clocksource/samsung_pwm_timer.c writel(mask | (mask << 5), pwm.base + REG_TINT_CSTAT); pwm 249 drivers/clocksource/samsung_pwm_timer.c if (pwm.variant.has_tint_cstat) { pwm 250 drivers/clocksource/samsung_pwm_timer.c u32 mask = (1 << pwm.event_id); pwm 251 drivers/clocksource/samsung_pwm_timer.c writel(mask | (mask << 5), pwm.base + REG_TINT_CSTAT); pwm 272 drivers/clocksource/samsung_pwm_timer.c pclk = clk_get_rate(pwm.timerclk); pwm 274 drivers/clocksource/samsung_pwm_timer.c samsung_timer_set_prescale(pwm.event_id, pwm.tscaler_div); pwm 275 drivers/clocksource/samsung_pwm_timer.c samsung_timer_set_divisor(pwm.event_id, pwm.tdiv); pwm 277 drivers/clocksource/samsung_pwm_timer.c clock_rate = pclk / (pwm.tscaler_div * pwm.tdiv); pwm 278 drivers/clocksource/samsung_pwm_timer.c pwm.clock_count_per_tick = clock_rate / HZ; pwm 282 drivers/clocksource/samsung_pwm_timer.c clock_rate, 1, pwm.tcnt_max); pwm 284 drivers/clocksource/samsung_pwm_timer.c irq_number = pwm.irq[pwm.event_id]; pwm 287 drivers/clocksource/samsung_pwm_timer.c if (pwm.variant.has_tint_cstat) { pwm 288 drivers/clocksource/samsung_pwm_timer.c u32 mask = (1 << pwm.event_id); pwm 289 drivers/clocksource/samsung_pwm_timer.c writel(mask | (mask << 5), pwm.base + REG_TINT_CSTAT); pwm 295 drivers/clocksource/samsung_pwm_timer.c samsung_time_stop(pwm.source_id); pwm 300 drivers/clocksource/samsung_pwm_timer.c samsung_timer_set_prescale(pwm.source_id, pwm.tscaler_div); pwm 301 drivers/clocksource/samsung_pwm_timer.c samsung_timer_set_divisor(pwm.source_id, pwm.tdiv); pwm 303 drivers/clocksource/samsung_pwm_timer.c samsung_time_setup(pwm.source_id, pwm.tcnt_max); pwm 304 drivers/clocksource/samsung_pwm_timer.c samsung_time_start(pwm.source_id, true); pwm 309 drivers/clocksource/samsung_pwm_timer.c return ~readl_relaxed(pwm.source_reg); pwm 338 drivers/clocksource/samsung_pwm_timer.c pclk = clk_get_rate(pwm.timerclk); pwm 340 drivers/clocksource/samsung_pwm_timer.c samsung_timer_set_prescale(pwm.source_id, pwm.tscaler_div); pwm 341 drivers/clocksource/samsung_pwm_timer.c samsung_timer_set_divisor(pwm.source_id, pwm.tdiv); pwm 343 drivers/clocksource/samsung_pwm_timer.c clock_rate = pclk / (pwm.tscaler_div * pwm.tdiv); pwm 345 drivers/clocksource/samsung_pwm_timer.c samsung_time_setup(pwm.source_id, pwm.tcnt_max); pwm 346 drivers/clocksource/samsung_pwm_timer.c samsung_time_start(pwm.source_id, true); pwm 348 drivers/clocksource/samsung_pwm_timer.c if (pwm.source_id == 4) pwm 349 drivers/clocksource/samsung_pwm_timer.c pwm.source_reg = pwm.base + 0x40; pwm 351 drivers/clocksource/samsung_pwm_timer.c pwm.source_reg = pwm.base + pwm.source_id * 0x0c + 0x14; pwm 354 drivers/clocksource/samsung_pwm_timer.c pwm.variant.bits, clock_rate); pwm 356 drivers/clocksource/samsung_pwm_timer.c samsung_clocksource.mask = CLOCKSOURCE_MASK(pwm.variant.bits); pwm 362 drivers/clocksource/samsung_pwm_timer.c clk_prepare_enable(pwm.timerclk); pwm 364 drivers/clocksource/samsung_pwm_timer.c pwm.tcnt_max = (1UL << pwm.variant.bits) - 1; pwm 365 drivers/clocksource/samsung_pwm_timer.c if (pwm.variant.bits == 16) { pwm 366 drivers/clocksource/samsung_pwm_timer.c pwm.tscaler_div = 25; pwm 367 drivers/clocksource/samsung_pwm_timer.c pwm.tdiv = 2; pwm 369 drivers/clocksource/samsung_pwm_timer.c pwm.tscaler_div = 2; pwm 370 drivers/clocksource/samsung_pwm_timer.c pwm.tdiv = 1; pwm 382 drivers/clocksource/samsung_pwm_timer.c mask = ~pwm.variant.output_mask & ((1 << SAMSUNG_PWM_NUM) - 1); pwm 388 drivers/clocksource/samsung_pwm_timer.c pwm.source_id = channel; pwm 396 drivers/clocksource/samsung_pwm_timer.c pwm.event_id = channel; pwm 407 drivers/clocksource/samsung_pwm_timer.c pwm.base = base; pwm 408 drivers/clocksource/samsung_pwm_timer.c memcpy(&pwm.variant, variant, sizeof(pwm.variant)); pwm 409 drivers/clocksource/samsung_pwm_timer.c memcpy(pwm.irq, irqs, SAMSUNG_PWM_NUM * sizeof(*irqs)); pwm 411 drivers/clocksource/samsung_pwm_timer.c pwm.timerclk = clk_get(NULL, "timers"); pwm 412 drivers/clocksource/samsung_pwm_timer.c if (IS_ERR(pwm.timerclk)) pwm 427 drivers/clocksource/samsung_pwm_timer.c memcpy(&pwm.variant, variant, sizeof(pwm.variant)); pwm 429 drivers/clocksource/samsung_pwm_timer.c pwm.irq[i] = irq_of_parse_and_map(np, i); pwm 437 drivers/clocksource/samsung_pwm_timer.c pwm.variant.output_mask |= 1 << val; pwm 440 drivers/clocksource/samsung_pwm_timer.c pwm.base = of_iomap(np, 0); pwm 441 drivers/clocksource/samsung_pwm_timer.c if (!pwm.base) { pwm 446 drivers/clocksource/samsung_pwm_timer.c pwm.timerclk = of_clk_get_by_name(np, "timers"); pwm 447 drivers/clocksource/samsung_pwm_timer.c if (IS_ERR(pwm.timerclk)) { pwm 449 drivers/clocksource/samsung_pwm_timer.c return PTR_ERR(pwm.timerclk); pwm 608 drivers/gpio/gpio-mvebu.c static int mvebu_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 622 drivers/gpio/gpio-mvebu.c pwm->hwpwm, "mvebu-pwm", pwm 637 drivers/gpio/gpio-mvebu.c static void mvebu_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 649 drivers/gpio/gpio-mvebu.c struct pwm_device *pwm, pwm 696 drivers/gpio/gpio-mvebu.c static int mvebu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 729 drivers/gpio/gpio-mvebu.c mvebu_gpio_blink(&mvchip->chip, pwm->hwpwm, 1); pwm 731 drivers/gpio/gpio-mvebu.c mvebu_gpio_blink(&mvchip->chip, pwm->hwpwm, 0); pwm 730 drivers/gpu/drm/gma500/cdv_intel_lvds.c u32 pwm; pwm 732 drivers/gpu/drm/gma500/cdv_intel_lvds.c pwm = REG_READ(BLC_PWM_CTL2); pwm 734 drivers/gpu/drm/gma500/cdv_intel_lvds.c pwm |= PWM_PIPE_B; pwm 736 drivers/gpu/drm/gma500/cdv_intel_lvds.c pwm &= ~PWM_PIPE_B; pwm 737 drivers/gpu/drm/gma500/cdv_intel_lvds.c pwm |= PWM_ENABLE; pwm 738 drivers/gpu/drm/gma500/cdv_intel_lvds.c REG_WRITE(BLC_PWM_CTL2, pwm); pwm 215 drivers/gpu/drm/i915/display/intel_display_types.h struct pwm_device *pwm; pwm 599 drivers/gpu/drm/i915/display/intel_panel.c duty_ns = pwm_get_duty_cycle(panel->backlight.pwm); pwm 675 drivers/gpu/drm/i915/display/intel_panel.c pwm_config(panel->backlight.pwm, duty_ns, CRC_PMIC_PWM_PERIOD_NS); pwm 841 drivers/gpu/drm/i915/display/intel_panel.c pwm_disable(panel->backlight.pwm); pwm 1159 drivers/gpu/drm/i915/display/intel_panel.c pwm_enable(panel->backlight.pwm); pwm 1515 drivers/gpu/drm/i915/display/intel_panel.c u32 pwm; pwm 1531 drivers/gpu/drm/i915/display/intel_panel.c pwm = panel->backlight.hz_to_pwm(connector, pwm_freq_hz); pwm 1532 drivers/gpu/drm/i915/display/intel_panel.c if (!pwm) { pwm 1537 drivers/gpu/drm/i915/display/intel_panel.c return pwm; pwm 1847 drivers/gpu/drm/i915/display/intel_panel.c panel->backlight.pwm = pwm_get(dev->dev, "pwm_backlight"); pwm 1848 drivers/gpu/drm/i915/display/intel_panel.c if (IS_ERR(panel->backlight.pwm)) { pwm 1850 drivers/gpu/drm/i915/display/intel_panel.c panel->backlight.pwm = NULL; pwm 1858 drivers/gpu/drm/i915/display/intel_panel.c pwm_apply_args(panel->backlight.pwm); pwm 1860 drivers/gpu/drm/i915/display/intel_panel.c retval = pwm_config(panel->backlight.pwm, CRC_PMIC_PWM_PERIOD_NS, pwm 1864 drivers/gpu/drm/i915/display/intel_panel.c pwm_put(panel->backlight.pwm); pwm 1865 drivers/gpu/drm/i915/display/intel_panel.c panel->backlight.pwm = NULL; pwm 1872 drivers/gpu/drm/i915/display/intel_panel.c pwm_get_duty_cycle(panel->backlight.pwm) * 100, pwm 1941 drivers/gpu/drm/i915/display/intel_panel.c if (panel->backlight.pwm) pwm 1942 drivers/gpu/drm/i915/display/intel_panel.c pwm_put(panel->backlight.pwm); pwm 1239 drivers/hwmon/abituguru.c SENSOR_ATTR_2(pwm%d_enable, 0644, show_pwm_enable, pwm 1241 drivers/hwmon/abituguru.c SENSOR_ATTR_2(pwm%d_auto_channels_temp, 0644, show_pwm_sensor, pwm 1243 drivers/hwmon/abituguru.c SENSOR_ATTR_2(pwm%d_auto_point1_pwm, 0644, show_pwm_setting, pwm 1245 drivers/hwmon/abituguru.c SENSOR_ATTR_2(pwm%d_auto_point2_pwm, 0644, show_pwm_setting, pwm 1247 drivers/hwmon/abituguru.c SENSOR_ATTR_2(pwm%d_auto_point1_temp, 0644, show_pwm_setting, pwm 1249 drivers/hwmon/abituguru.c SENSOR_ATTR_2(pwm%d_auto_point2_temp, 0644, show_pwm_setting, pwm 252 drivers/hwmon/adm1026.c u8 pwm; pwm 351 drivers/hwmon/adm1026.c data->pwm1.pwm = adm1026_read_value(client, pwm 440 drivers/hwmon/adm1026.c PWM_MIN_FROM_REG(data->pwm1.pwm); pwm 1267 drivers/hwmon/adm1026.c return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm1.pwm)); pwm 1285 drivers/hwmon/adm1026.c data->pwm1.pwm = PWM_TO_REG(val); pwm 1286 drivers/hwmon/adm1026.c adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); pwm 1316 drivers/hwmon/adm1026.c data->pwm1.pwm = PWM_TO_REG((data->pwm1.pwm & 0x0f) | pwm 1318 drivers/hwmon/adm1026.c adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); pwm 1362 drivers/hwmon/adm1026.c data->pwm1.pwm = PWM_TO_REG((data->pwm1.pwm & 0x0f) | pwm 1364 drivers/hwmon/adm1026.c adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); pwm 1367 drivers/hwmon/adm1026.c data->pwm1.pwm = 255; pwm 1368 drivers/hwmon/adm1026.c adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); pwm 82 drivers/hwmon/adm1031.c u8 pwm[2]; pwm 185 drivers/hwmon/adm1031.c data->pwm[chan] = pwm 242 drivers/hwmon/adm1031.c static int AUTO_TEMP_MAX_TO_REG(int val, int reg, int pwm) pwm 247 drivers/hwmon/adm1031.c range = ((val - AUTO_TEMP_MIN_FROM_REG(reg))*10)/(16 - pwm); pwm 364 drivers/hwmon/adm1031.c data->old_pwm[0] = data->pwm[0]; pwm 365 drivers/hwmon/adm1031.c data->old_pwm[1] = data->pwm[1]; pwm 369 drivers/hwmon/adm1031.c data->pwm[0] = data->old_pwm[0]; pwm 370 drivers/hwmon/adm1031.c data->pwm[1] = data->old_pwm[1]; pwm 373 drivers/hwmon/adm1031.c data->pwm[0] | (data->pwm[1] << 4)); pwm 449 drivers/hwmon/adm1031.c data->pwm[nr]); pwm 472 drivers/hwmon/adm1031.c return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm[nr])); pwm 494 drivers/hwmon/adm1031.c data->pwm[nr] = PWM_TO_REG(val); pwm 497 drivers/hwmon/adm1031.c nr ? ((data->pwm[nr] << 4) & 0xf0) | (reg & 0xf) pwm 498 drivers/hwmon/adm1031.c : (data->pwm[nr] & 0xf) | (reg & 0xf0)); pwm 503 drivers/hwmon/adm1031.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 504 drivers/hwmon/adm1031.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, 1); pwm 505 drivers/hwmon/adm1031.c static SENSOR_DEVICE_ATTR_RW(auto_fan1_min_pwm, pwm, 0); pwm 506 drivers/hwmon/adm1031.c static SENSOR_DEVICE_ATTR_RW(auto_fan2_min_pwm, pwm, 1); pwm 551 drivers/hwmon/adm1031.c res = data->pwm[chan] > 0; pwm 208 drivers/hwmon/adt7462.c u8 pwm[ADT7462_PWM_COUNT]; pwm 704 drivers/hwmon/adt7462.c data->pwm[i] = i2c_smbus_read_byte_data(client, pwm 1089 drivers/hwmon/adt7462.c return sprintf(buf, "%d\n", data->pwm[attr->index]); pwm 1106 drivers/hwmon/adt7462.c data->pwm[attr->index] = temp; pwm 1545 drivers/hwmon/adt7462.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 1546 drivers/hwmon/adt7462.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, 1); pwm 1547 drivers/hwmon/adt7462.c static SENSOR_DEVICE_ATTR_RW(pwm3, pwm, 2); pwm 1548 drivers/hwmon/adt7462.c static SENSOR_DEVICE_ATTR_RW(pwm4, pwm, 3); pwm 159 drivers/hwmon/adt7470.c u8 pwm[ADT7470_PWM_COUNT]; pwm 195 drivers/hwmon/adt7470.c u8 cfg, pwm[4], pwm_cfg[2]; pwm 203 drivers/hwmon/adt7470.c pwm[i] = i2c_smbus_read_byte_data(client, ADT7470_REG_PWM(i)); pwm 213 drivers/hwmon/adt7470.c i2c_smbus_write_byte_data(client, ADT7470_REG_PWM(i), pwm[i]); pwm 320 drivers/hwmon/adt7470.c data->pwm[i] = i2c_smbus_read_byte_data(client, pwm 673 drivers/hwmon/adt7470.c return sprintf(buf, "%d\n", data->pwm[attr->index]); pwm 690 drivers/hwmon/adt7470.c data->pwm[attr->index] = temp; pwm 1049 drivers/hwmon/adt7470.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 1050 drivers/hwmon/adt7470.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, 1); pwm 1051 drivers/hwmon/adt7470.c static SENSOR_DEVICE_ATTR_RW(pwm3, pwm, 2); pwm 1052 drivers/hwmon/adt7470.c static SENSOR_DEVICE_ATTR_RW(pwm4, pwm, 3); pwm 207 drivers/hwmon/adt7475.c u8 pwm[4][3]; pwm 741 drivers/hwmon/adt7475.c return sprintf(buf, "%d\n", data->pwm[sattr->nr][sattr->index]); pwm 786 drivers/hwmon/adt7475.c data->pwm[CONTROL][sattr->index] = pwm 793 drivers/hwmon/adt7475.c if (((data->pwm[CONTROL][sattr->index] >> 5) & 7) != 7) { pwm 810 drivers/hwmon/adt7475.c data->pwm[sattr->nr][sattr->index] = clamp_val(val, 0, 0xFF); pwm 812 drivers/hwmon/adt7475.c data->pwm[sattr->nr][sattr->index]); pwm 904 drivers/hwmon/adt7475.c data->pwm[CONTROL][index] &= ~0xE0; pwm 905 drivers/hwmon/adt7475.c data->pwm[CONTROL][index] |= (val & 7) << 5; pwm 908 drivers/hwmon/adt7475.c data->pwm[CONTROL][index]); pwm 1148 drivers/hwmon/adt7475.c static SENSOR_DEVICE_ATTR_2_RW(pwm1, pwm, INPUT, 0); pwm 1152 drivers/hwmon/adt7475.c static SENSOR_DEVICE_ATTR_2_RW(pwm1_auto_point1_pwm, pwm, MIN, 0); pwm 1153 drivers/hwmon/adt7475.c static SENSOR_DEVICE_ATTR_2_RW(pwm1_auto_point2_pwm, pwm, MAX, 0); pwm 1155 drivers/hwmon/adt7475.c static SENSOR_DEVICE_ATTR_2_RW(pwm2, pwm, INPUT, 1); pwm 1159 drivers/hwmon/adt7475.c static SENSOR_DEVICE_ATTR_2_RW(pwm2_auto_point1_pwm, pwm, MIN, 1); pwm 1160 drivers/hwmon/adt7475.c static SENSOR_DEVICE_ATTR_2_RW(pwm2_auto_point2_pwm, pwm, MAX, 1); pwm 1162 drivers/hwmon/adt7475.c static SENSOR_DEVICE_ATTR_2_RW(pwm3, pwm, INPUT, 2); pwm 1166 drivers/hwmon/adt7475.c static SENSOR_DEVICE_ATTR_2_RW(pwm3_auto_point1_pwm, pwm, MIN, 2); pwm 1167 drivers/hwmon/adt7475.c static SENSOR_DEVICE_ATTR_2_RW(pwm3_auto_point2_pwm, pwm, MAX, 2); pwm 1433 drivers/hwmon/adt7475.c data->pwm[MAX][i] = ret; pwm 1438 drivers/hwmon/adt7475.c data->pwm[MIN][i] = ret; pwm 1662 drivers/hwmon/adt7475.c data->pwm[CONTROL][index] = adt7475_read(PWM_CONFIG_REG(index)); pwm 1668 drivers/hwmon/adt7475.c v = (data->pwm[CONTROL][index] >> 5) & 7; pwm 1680 drivers/hwmon/adt7475.c data->pwm[INPUT][index] = 0; pwm 1681 drivers/hwmon/adt7475.c data->pwm[CONTROL][index] &= ~0xE0; pwm 1682 drivers/hwmon/adt7475.c data->pwm[CONTROL][index] |= (7 << 5); pwm 1685 drivers/hwmon/adt7475.c data->pwm[INPUT][index]); pwm 1688 drivers/hwmon/adt7475.c data->pwm[CONTROL][index]); pwm 1798 drivers/hwmon/adt7475.c data->pwm[INPUT][i] = ret; pwm 152 drivers/hwmon/asb100.c static u8 ASB100_PWM_TO_REG(int pwm) pwm 154 drivers/hwmon/asb100.c pwm = clamp_val(pwm, 0, 255); pwm 155 drivers/hwmon/asb100.c return (u8)(pwm / 16); pwm 199 drivers/hwmon/asb100.c u8 pwm; /* Register encoding */ pwm 544 drivers/hwmon/asb100.c return sprintf(buf, "%d\n", ASB100_PWM_FROM_REG(data->pwm & 0x0f)); pwm 560 drivers/hwmon/asb100.c data->pwm &= 0x80; /* keep the enable bit */ pwm 561 drivers/hwmon/asb100.c data->pwm |= (0x0f & ASB100_PWM_TO_REG(val)); pwm 562 drivers/hwmon/asb100.c asb100_write_value(client, ASB100_REG_PWM1, data->pwm); pwm 571 drivers/hwmon/asb100.c return sprintf(buf, "%d\n", (data->pwm & 0x80) ? 1 : 0); pwm 588 drivers/hwmon/asb100.c data->pwm &= 0x0f; /* keep the duty cycle bits */ pwm 589 drivers/hwmon/asb100.c data->pwm |= (val ? 0x80 : 0x00); pwm 590 drivers/hwmon/asb100.c asb100_write_value(client, ASB100_REG_PWM1, data->pwm); pwm 991 drivers/hwmon/asb100.c data->pwm = asb100_read_value(client, ASB100_REG_PWM1); pwm 642 drivers/hwmon/aspeed-pwm-tacho.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 643 drivers/hwmon/aspeed-pwm-tacho.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, 1); pwm 644 drivers/hwmon/aspeed-pwm-tacho.c static SENSOR_DEVICE_ATTR_RW(pwm3, pwm, 2); pwm 645 drivers/hwmon/aspeed-pwm-tacho.c static SENSOR_DEVICE_ATTR_RW(pwm4, pwm, 3); pwm 646 drivers/hwmon/aspeed-pwm-tacho.c static SENSOR_DEVICE_ATTR_RW(pwm5, pwm, 4); pwm 647 drivers/hwmon/aspeed-pwm-tacho.c static SENSOR_DEVICE_ATTR_RW(pwm6, pwm, 5); pwm 648 drivers/hwmon/aspeed-pwm-tacho.c static SENSOR_DEVICE_ATTR_RW(pwm7, pwm, 6); pwm 649 drivers/hwmon/aspeed-pwm-tacho.c static SENSOR_DEVICE_ATTR_RW(pwm8, pwm, 7); pwm 231 drivers/hwmon/dme1737.c u8 pwm[6]; pwm 703 drivers/hwmon/dme1737.c for (ix = 0; ix < ARRAY_SIZE(data->pwm); ix++) { pwm 710 drivers/hwmon/dme1737.c data->pwm[ix] = dme1737_read(data, pwm 1211 drivers/hwmon/dme1737.c res = data->pwm[ix]; pwm 1277 drivers/hwmon/dme1737.c data->pwm[ix] = clamp_val(val, 0, 255); pwm 1278 drivers/hwmon/dme1737.c dme1737_write(data, DME1737_REG_PWM(ix), data->pwm[ix]); pwm 1603 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix, S_IRUGO, \ pwm 1605 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix##_freq, S_IRUGO, \ pwm 1607 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix##_enable, S_IRUGO, \ pwm 1609 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix##_ramp_rate, S_IRUGO, \ pwm 1611 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix##_auto_channels_zone, S_IRUGO, \ pwm 1613 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix##_auto_pwm_min, S_IRUGO, \ pwm 1615 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix##_auto_point1_pwm, S_IRUGO, \ pwm 1617 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix##_auto_point2_pwm, S_IRUGO, \ pwm 1627 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix, S_IRUGO, \ pwm 1629 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix##_freq, S_IRUGO, \ pwm 1631 drivers/hwmon/dme1737.c static SENSOR_DEVICE_ATTR_2(pwm##ix##_enable, S_IRUGO, \ pwm 181 drivers/hwmon/f71805f.c u8 pwm[3]; pwm 395 drivers/hwmon/f71805f.c data->pwm[nr] = f71805f_read8(data, pwm 643 drivers/hwmon/f71805f.c return sprintf(buf, "%d\n", (int)data->pwm[nr]); pwm 705 drivers/hwmon/f71805f.c data->pwm[nr] = val; pwm 706 drivers/hwmon/f71805f.c f71805f_write8(data, F71805F_REG_PWM_DUTY(nr), data->pwm[nr]); pwm 92 drivers/hwmon/f71882fg.c #define F71882FG_REG_POINT_PWM(pwm, point) (0xAA + (point) + (16 * (pwm))) pwm 93 drivers/hwmon/f71882fg.c #define F71882FG_REG_POINT_TEMP(pwm, point) (0xA6 + (point) + (16 * (pwm))) pwm 285 drivers/hwmon/f71882fg.c u8 pwm[4]; pwm 1332 drivers/hwmon/f71882fg.c data->pwm[nr] = pwm 1339 drivers/hwmon/f71882fg.c data->pwm[2] = f71882fg_read8(data, pwm 1796 drivers/hwmon/f71882fg.c val = data->pwm[nr]; pwm 1830 drivers/hwmon/f71882fg.c data->pwm[nr] = val; pwm 1853 drivers/hwmon/f71882fg.c val = data->pwm[nr]; pwm 1873 drivers/hwmon/f71882fg.c data->pwm[nr] = val; pwm 1967 drivers/hwmon/f71882fg.c int pwm = to_sensor_dev_attr_2(devattr)->index; pwm 1971 drivers/hwmon/f71882fg.c if (data->pwm_enable & (1 << (2 * pwm))) { pwm 1973 drivers/hwmon/f71882fg.c result = data->pwm_auto_point_pwm[pwm][point]; pwm 1976 drivers/hwmon/f71882fg.c result = 32 * 255 / (32 + data->pwm_auto_point_pwm[pwm][point]); pwm 1988 drivers/hwmon/f71882fg.c int err, pwm = to_sensor_dev_attr_2(devattr)->index; pwm 2000 drivers/hwmon/f71882fg.c if (data->pwm_enable & (1 << (2 * pwm))) { pwm 2009 drivers/hwmon/f71882fg.c f71882fg_write8(data, F71882FG_REG_POINT_PWM(pwm, point), val); pwm 2010 drivers/hwmon/f71882fg.c data->pwm_auto_point_pwm[pwm][point] = val; pwm 2167 drivers/hwmon/f71882fg.c int pwm = to_sensor_dev_attr_2(devattr)->index; pwm 2170 drivers/hwmon/f71882fg.c result = data->pwm_auto_point_temp[pwm][point]; pwm 2179 drivers/hwmon/f71882fg.c int err, pwm = to_sensor_dev_attr_2(devattr)->index; pwm 2195 drivers/hwmon/f71882fg.c f71882fg_write8(data, F71882FG_REG_POINT_TEMP(pwm, point), val); pwm 2196 drivers/hwmon/f71882fg.c data->pwm_auto_point_temp[pwm][point] = val; pwm 101 drivers/hwmon/f75375s.c u8 pwm[2]; pwm 171 drivers/hwmon/f75375s.c f75375_write16(client, F75375_REG_FAN_EXP(nr), data->pwm[nr]); pwm 174 drivers/hwmon/f75375s.c data->pwm[nr]); pwm 214 drivers/hwmon/f75375s.c data->pwm[nr] = f75375_read8(client, pwm 348 drivers/hwmon/f75375s.c data->pwm[nr] = clamp_val(val, 0, 255); pwm 383 drivers/hwmon/f75375s.c data->pwm[nr] = 255; pwm 404 drivers/hwmon/f75375s.c data->pwm[nr] = 255; pwm 494 drivers/hwmon/f75375s.c return sprintf(buf, "%d\n", data->pwm[nr]); pwm 811 drivers/hwmon/f75375s.c data->pwm[nr] = clamp_val(f75375s_pdata->pwm[nr], 0, 255); pwm 59 drivers/hwmon/g760a.c #define PWM_TO_CNT(pwm) (0xff-(pwm)) pwm 169 drivers/hwmon/gpio-fan.c u8 pwm = fan_data->speed_index * 255 / (fan_data->num_speed - 1); pwm 171 drivers/hwmon/gpio-fan.c return sprintf(buf, "%d\n", pwm); pwm 178 drivers/hwmon/gpio-fan.c unsigned long pwm; pwm 182 drivers/hwmon/gpio-fan.c if (kstrtoul(buf, 10, &pwm) || pwm > 255) pwm 192 drivers/hwmon/gpio-fan.c speed_index = DIV_ROUND_UP(pwm * (fan_data->num_speed - 1), 255); pwm 2997 drivers/hwmon/it87.c u8 pwm[3]; pwm 2999 drivers/hwmon/it87.c for (i = 0; i < ARRAY_SIZE(pwm); i++) pwm 3000 drivers/hwmon/it87.c pwm[i] = it87_read_value(data, pwm 3009 drivers/hwmon/it87.c if (!((pwm[0] | pwm[1] | pwm[2]) & 0x80)) { pwm 3017 drivers/hwmon/it87.c 0x7f & ~pwm[i]); pwm 367 drivers/hwmon/lm63.c int pwm; pwm 370 drivers/hwmon/lm63.c pwm = data->pwm1[nr]; pwm 372 drivers/hwmon/lm63.c pwm = data->pwm1[nr] >= 2 * data->pwm1_freq ? pwm 376 drivers/hwmon/lm63.c return sprintf(buf, "%d\n", pwm); pwm 309 drivers/hwmon/lm85.c u8 pwm[3]; /* Register value */ pwm 422 drivers/hwmon/lm85.c data->pwm[i] = pwm 688 drivers/hwmon/lm85.c return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm[nr])); pwm 705 drivers/hwmon/lm85.c data->pwm[nr] = PWM_TO_REG(val); pwm 706 drivers/hwmon/lm85.c lm85_write_value(client, LM85_REG_PWM(nr), data->pwm[nr]); pwm 831 drivers/hwmon/lm85.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 834 drivers/hwmon/lm85.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, 1); pwm 837 drivers/hwmon/lm85.c static SENSOR_DEVICE_ATTR_RW(pwm3, pwm, 2); pwm 582 drivers/hwmon/lm93.c static u8 LM93_PWM_TO_REG(int pwm, enum pwm_freq freq) pwm 586 drivers/hwmon/lm93.c if (pwm <= lm93_pwm_map[freq][i]) pwm 1793 drivers/hwmon/lm93.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 1794 drivers/hwmon/lm93.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, 1); pwm 1870 drivers/hwmon/lm93.c struct lm93_data *data, int pwm) pwm 1876 drivers/hwmon/lm93.c mapping = (mapping >> pwm) & 0x55; pwm 63 drivers/hwmon/max31790.c u16 pwm[NR_CHANNEL]; pwm 110 drivers/hwmon/max31790.c data->pwm[i] = rv; pwm 271 drivers/hwmon/max31790.c *val = data->pwm[channel] >> 8; pwm 302 drivers/hwmon/max31790.c data->pwm[channel] = val << 8; pwm 305 drivers/hwmon/max31790.c data->pwm[channel]); pwm 408 drivers/hwmon/max31790.c HWMON_CHANNEL_INFO(pwm, pwm 82 drivers/hwmon/max6639.c u8 pwm[2]; /* Register value: Duty cycle 0..120 */ pwm 281 drivers/hwmon/max6639.c return sprintf(buf, "%d\n", data->pwm[attr->index] * 255 / 120); pwm 301 drivers/hwmon/max6639.c data->pwm[attr->index] = (u8)(val * 120 / 255); pwm 304 drivers/hwmon/max6639.c data->pwm[attr->index]); pwm 344 drivers/hwmon/max6639.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 345 drivers/hwmon/max6639.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, 1); pwm 484 drivers/hwmon/max6639.c data->pwm[i] = 120; pwm 486 drivers/hwmon/max6639.c MAX6639_REG_TARGTDUTY(i), data->pwm[i]); pwm 149 drivers/hwmon/max6650.c static u8 pwm_to_dac(unsigned int pwm, bool v12) pwm 153 drivers/hwmon/max6650.c return limit - (limit * pwm) / 255; pwm 745 drivers/hwmon/max6650.c HWMON_CHANNEL_INFO(pwm, HWMON_PWM_INPUT | HWMON_PWM_ENABLE), pwm 105 drivers/hwmon/mlxreg-fan.c struct mlxreg_fan_pwm pwm; pwm 150 drivers/hwmon/mlxreg-fan.c err = regmap_read(fan->regmap, fan->pwm.reg, ®val); pwm 182 drivers/hwmon/mlxreg-fan.c return regmap_write(fan->regmap, fan->pwm.reg, val); pwm 214 drivers/hwmon/mlxreg-fan.c if (!(((struct mlxreg_fan *)data)->pwm.connected)) pwm 246 drivers/hwmon/mlxreg-fan.c HWMON_CHANNEL_INFO(pwm, pwm 277 drivers/hwmon/mlxreg-fan.c err = regmap_read(fan->regmap, fan->pwm.reg, ®val); pwm 314 drivers/hwmon/mlxreg-fan.c err = regmap_read(fan->regmap, fan->pwm.reg, ®val); pwm 332 drivers/hwmon/mlxreg-fan.c err = regmap_write(fan->regmap, fan->pwm.reg, pwm 420 drivers/hwmon/mlxreg-fan.c if (fan->pwm.connected) { pwm 425 drivers/hwmon/mlxreg-fan.c fan->pwm.reg = data->reg; pwm 426 drivers/hwmon/mlxreg-fan.c fan->pwm.connected = true; pwm 325 drivers/hwmon/nct6683.c u8 pwm[NCT6683_NUM_REG_PWM]; pwm 590 drivers/hwmon/nct6683.c data->pwm[i] = nct6683_read(data, NCT6683_REG_PWM(i)); pwm 917 drivers/hwmon/nct6683.c return sprintf(buf, "%d\n", data->pwm[index]); pwm 942 drivers/hwmon/nct6683.c SENSOR_TEMPLATE(pwm, "pwm%d", S_IRUGO, show_pwm, store_pwm, 0); pwm 949 drivers/hwmon/nct6683.c int pwm = index; /* pwm index */ pwm 951 drivers/hwmon/nct6683.c if (!(data->have_pwm & (1 << pwm))) pwm 965 drivers/hwmon/nct6775.c static enum pwm_enable reg_to_pwm_enable(int pwm, int mode) pwm 967 drivers/hwmon/nct6775.c if (mode == 0 && pwm == 255) pwm 1178 drivers/hwmon/nct6775.c u8 pwm[7][NUM_FAN]; /* [0]=pwm, [1]=pwm_start, [2]=pwm_floor, pwm 1642 drivers/hwmon/nct6775.c data->pwm[j][i] pwm 1648 drivers/hwmon/nct6775.c data->pwm_enable[i] = reg_to_pwm_enable(data->pwm[0][i], pwm 1673 drivers/hwmon/nct6775.c data->pwm[2][i] = 0; pwm 2574 drivers/hwmon/nct6775.c int pwm; pwm 2581 drivers/hwmon/nct6775.c pwm = nct6775_read_value(data, data->REG_PWM_READ[nr]); pwm 2583 drivers/hwmon/nct6775.c pwm = data->pwm[index][nr]; pwm 2585 drivers/hwmon/nct6775.c return sprintf(buf, "%d\n", pwm); pwm 2597 drivers/hwmon/nct6775.c int minval[7] = { 0, 1, 1, data->pwm[2][nr], 0, 0, 0 }; pwm 2599 drivers/hwmon/nct6775.c = { 255, 255, data->pwm[3][nr] ? : 255, 255, 255, 255, 255 }; pwm 2609 drivers/hwmon/nct6775.c data->pwm[index][nr] = val; pwm 2724 drivers/hwmon/nct6775.c data->pwm[0][nr] = 255; pwm 3028 drivers/hwmon/nct6775.c SENSOR_TEMPLATE_2(pwm, "pwm%d", S_IWUSR | S_IRUGO, show_pwm, store_pwm, 0, 0); pwm 3262 drivers/hwmon/nct6775.c int pwm = index / 36; /* pwm index */ pwm 3265 drivers/hwmon/nct6775.c if (!(data->has_pwm & BIT(pwm))) pwm 3269 drivers/hwmon/nct6775.c if (!data->REG_WEIGHT_TEMP_SEL[pwm]) pwm 827 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, REG_PWM(0)); pwm 828 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, REG_PWM(1)); pwm 829 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm3, pwm, REG_PWM(2)); pwm 899 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm1_auto_point1_pwm, pwm, 0x85); pwm 900 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm1_auto_point2_pwm, pwm, 0x86); pwm 901 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm1_auto_point3_pwm, pwm, 0x87); pwm 902 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm1_auto_point4_pwm, pwm, 0x88); pwm 903 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RO(pwm1_auto_point5_pwm, pwm, 0); pwm 913 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm2_auto_point1_pwm, pwm, 0x95); pwm 914 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm2_auto_point2_pwm, pwm, 0x96); pwm 915 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm2_auto_point3_pwm, pwm, 0x97); pwm 916 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm2_auto_point4_pwm, pwm, 0x98); pwm 917 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RO(pwm2_auto_point5_pwm, pwm, 0); pwm 927 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm3_auto_point1_pwm, pwm, 0xA5); pwm 928 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm3_auto_point2_pwm, pwm, 0xA6); pwm 929 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm3_auto_point3_pwm, pwm, 0xA7); pwm 930 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RW(pwm3_auto_point4_pwm, pwm, 0xA8); pwm 931 drivers/hwmon/nct7802.c static SENSOR_DEVICE_ATTR_RO(pwm3_auto_point5_pwm, pwm, 0); pwm 826 drivers/hwmon/nct7904.c HWMON_CHANNEL_INFO(pwm, pwm 633 drivers/hwmon/npcm750-pwm-fan.c HWMON_CHANNEL_INFO(pwm, pwm 191 drivers/hwmon/pc87360.c u8 pwm[3]; /* Register value */ pwm 349 drivers/hwmon/pc87360.c PWM_FROM_REG(data->pwm[attr->index], pwm 366 drivers/hwmon/pc87360.c data->pwm[attr->index] = PWM_TO_REG(val, pwm 369 drivers/hwmon/pc87360.c data->pwm[attr->index]); pwm 374 drivers/hwmon/pc87360.c static struct sensor_device_attribute pwm[] = { pwm 375 drivers/hwmon/pc87360.c SENSOR_ATTR_RW(pwm1, pwm, 0), pwm 376 drivers/hwmon/pc87360.c SENSOR_ATTR_RW(pwm2, pwm, 1), pwm 377 drivers/hwmon/pc87360.c SENSOR_ATTR_RW(pwm3, pwm, 2), pwm 1187 drivers/hwmon/pc87360.c device_remove_file(dev, &pwm[i].dev_attr); pwm 1325 drivers/hwmon/pc87360.c err = device_create_file(dev, &pwm[i].dev_attr); pwm 1603 drivers/hwmon/pc87360.c data->pwm[i] = pc87360_read_value(data, LD_FAN, pwm 61 drivers/hwmon/pc87427.c u8 pwm[4]; /* register values */ pwm 245 drivers/hwmon/pc87427.c data->pwm[nr] = inb(iobase + PC87427_REG_PWM_DUTY); pwm 593 drivers/hwmon/pc87427.c update_pwm_enable(data, nr, pwm_enable_to_reg(val, data->pwm[nr])); pwm 605 drivers/hwmon/pc87427.c return sprintf(buf, "%d\n", (int)data->pwm[nr]); pwm 646 drivers/hwmon/pc87427.c data->pwm[nr] = val; pwm 659 drivers/hwmon/pc87427.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 660 drivers/hwmon/pc87427.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, 1); pwm 661 drivers/hwmon/pc87427.c static SENSOR_DEVICE_ATTR_RW(pwm3, pwm, 2); pwm 662 drivers/hwmon/pc87427.c static SENSOR_DEVICE_ATTR_RW(pwm4, pwm, 3); pwm 27 drivers/hwmon/pwm-fan.c struct pwm_device *pwm; pwm 70 drivers/hwmon/pwm-fan.c static int __set_pwm(struct pwm_fan_ctx *ctx, unsigned long pwm) pwm 77 drivers/hwmon/pwm-fan.c if (ctx->pwm_value == pwm) pwm 80 drivers/hwmon/pwm-fan.c pwm_init_state(ctx->pwm, &state); pwm 81 drivers/hwmon/pwm-fan.c period = ctx->pwm->args.period; pwm 82 drivers/hwmon/pwm-fan.c state.duty_cycle = DIV_ROUND_UP(pwm * (period - 1), MAX_PWM); pwm 83 drivers/hwmon/pwm-fan.c state.enabled = pwm ? true : false; pwm 85 drivers/hwmon/pwm-fan.c ret = pwm_apply_state(ctx->pwm, &state); pwm 87 drivers/hwmon/pwm-fan.c ctx->pwm_value = pwm; pwm 93 drivers/hwmon/pwm-fan.c static void pwm_fan_update_state(struct pwm_fan_ctx *ctx, unsigned long pwm) pwm 98 drivers/hwmon/pwm-fan.c if (pwm < ctx->pwm_fan_cooling_levels[i + 1]) pwm 108 drivers/hwmon/pwm-fan.c unsigned long pwm; pwm 111 drivers/hwmon/pwm-fan.c if (kstrtoul(buf, 10, &pwm) || pwm > MAX_PWM) pwm 114 drivers/hwmon/pwm-fan.c ret = __set_pwm(ctx, pwm); pwm 118 drivers/hwmon/pwm-fan.c pwm_fan_update_state(ctx, pwm); pwm 138 drivers/hwmon/pwm-fan.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 275 drivers/hwmon/pwm-fan.c pwm_disable(ctx->pwm); pwm 295 drivers/hwmon/pwm-fan.c ctx->pwm = devm_of_pwm_get(dev, dev->of_node, NULL); pwm 296 drivers/hwmon/pwm-fan.c if (IS_ERR(ctx->pwm)) { pwm 297 drivers/hwmon/pwm-fan.c ret = PTR_ERR(ctx->pwm); pwm 332 drivers/hwmon/pwm-fan.c pwm_init_state(ctx->pwm, &state); pwm 333 drivers/hwmon/pwm-fan.c state.duty_cycle = ctx->pwm->args.period - 1; pwm 336 drivers/hwmon/pwm-fan.c ret = pwm_apply_state(ctx->pwm, &state); pwm 400 drivers/hwmon/pwm-fan.c pwm_get_args(ctx->pwm, &args); pwm 403 drivers/hwmon/pwm-fan.c ret = pwm_config(ctx->pwm, 0, args.period); pwm 407 drivers/hwmon/pwm-fan.c pwm_disable(ctx->pwm); pwm 439 drivers/hwmon/pwm-fan.c pwm_get_args(ctx->pwm, &pargs); pwm 441 drivers/hwmon/pwm-fan.c ret = pwm_config(ctx->pwm, duty, pargs.period); pwm 444 drivers/hwmon/pwm-fan.c return pwm_enable(ctx->pwm); pwm 129 drivers/hwmon/smsc47m1.c u8 pwm[3]; /* Register value (bit 0 is disable) */ pwm 164 drivers/hwmon/smsc47m1.c data->pwm[i] = smsc47m1_read_value(data, pwm 209 drivers/hwmon/smsc47m1.c int rpm = (data->pwm[nr] & 0x7F) == 0x00 ? 0 : pwm 248 drivers/hwmon/smsc47m1.c return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm[attr->index])); pwm 256 drivers/hwmon/smsc47m1.c return sprintf(buf, "%d\n", PWM_EN_FROM_REG(data->pwm[attr->index])); pwm 386 drivers/hwmon/smsc47m1.c data->pwm[nr] &= 0x81; /* Preserve additional bits */ pwm 387 drivers/hwmon/smsc47m1.c data->pwm[nr] |= PWM_TO_REG(val); pwm 389 drivers/hwmon/smsc47m1.c data->pwm[nr]); pwm 413 drivers/hwmon/smsc47m1.c data->pwm[nr] &= 0xFE; /* preserve the other bits */ pwm 414 drivers/hwmon/smsc47m1.c data->pwm[nr] |= !val; pwm 416 drivers/hwmon/smsc47m1.c data->pwm[nr]); pwm 426 drivers/hwmon/smsc47m1.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 432 drivers/hwmon/smsc47m1.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, 1); pwm 438 drivers/hwmon/smsc47m1.c static SENSOR_DEVICE_ATTR_RW(pwm3, pwm, 2); pwm 369 drivers/hwmon/tc654.c int pwm; pwm 375 drivers/hwmon/tc654.c pwm = 0; pwm 377 drivers/hwmon/tc654.c pwm = tc654_pwm_map[data->duty_cycle]; pwm 379 drivers/hwmon/tc654.c return sprintf(buf, "%d\n", pwm); pwm 426 drivers/hwmon/tc654.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 122 drivers/hwmon/vt1211.c u8 pwm[2]; pwm 289 drivers/hwmon/vt1211.c data->pwm[ix] = vt1211_read8(data, pwm 608 drivers/hwmon/vt1211.c res = data->pwm[ix]; pwm 1017 drivers/hwmon/vt1211.c SENSOR_ATTR_2(pwm##ix, S_IRUGO, \ pwm 1019 drivers/hwmon/vt1211.c SENSOR_ATTR_2(pwm##ix##_enable, S_IRUGO | S_IWUSR, \ pwm 1021 drivers/hwmon/vt1211.c SENSOR_ATTR_2(pwm##ix##_auto_channels_temp, S_IRUGO | S_IWUSR, \ pwm 1025 drivers/hwmon/vt1211.c SENSOR_ATTR_2(pwm##ix##_freq, S_IRUGO | S_IWUSR, \ pwm 1029 drivers/hwmon/vt1211.c SENSOR_ATTR_2(pwm##ix##_freq, S_IRUGO, \ pwm 1033 drivers/hwmon/vt1211.c SENSOR_ATTR_2(pwm##ix##_auto_point##ap##_temp, S_IRUGO | S_IWUSR, \ pwm 1038 drivers/hwmon/vt1211.c SENSOR_ATTR_2(pwm##ix##_auto_point##ap##_temp, S_IRUGO, \ pwm 1043 drivers/hwmon/vt1211.c SENSOR_ATTR_2(pwm##ix##_auto_point##ap##_pwm, S_IRUGO | S_IWUSR, \ pwm 1048 drivers/hwmon/vt1211.c SENSOR_ATTR_2(pwm##ix##_auto_point##ap##_pwm, S_IRUGO, \ pwm 480 drivers/hwmon/w83627ehf.c u8 pwm[4]; pwm 744 drivers/hwmon/w83627ehf.c data->pwm[i] = w83627ehf_read_value(data, data->REG_PWM[i]); pwm 768 drivers/hwmon/w83627ehf.c data->pwm[i] = w83627ehf_read_value(data, data->REG_PWM[i]); pwm 1380 drivers/hwmon/w83627ehf.c show_pwm_reg(pwm) pwm 1433 drivers/hwmon/w83627ehf.c data->pwm[nr] = val; pwm 373 drivers/hwmon/w83627hf.c u8 pwm[3]; /* Register value */ pwm 1040 drivers/hwmon/w83627hf.c return sprintf(buf, "%ld\n", (long) data->pwm[nr]); pwm 1060 drivers/hwmon/w83627hf.c data->pwm[nr] = PWM_TO_REG(val) & 0xf0; pwm 1063 drivers/hwmon/w83627hf.c data->pwm[nr] | pwm 1067 drivers/hwmon/w83627hf.c data->pwm[nr] = PWM_TO_REG(val); pwm 1070 drivers/hwmon/w83627hf.c data->pwm[nr]); pwm 1077 drivers/hwmon/w83627hf.c static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); pwm 1078 drivers/hwmon/w83627hf.c static SENSOR_DEVICE_ATTR_RW(pwm2, pwm, 1); pwm 1079 drivers/hwmon/w83627hf.c static SENSOR_DEVICE_ATTR_RW(pwm3, pwm, 2); pwm 1860 drivers/hwmon/w83627hf.c data->pwm[i] = tmp; pwm 227 drivers/hwmon/w83781d.c u8 pwm[4]; /* Register value */ pwm 693 drivers/hwmon/w83781d.c return sprintf(buf, "%d\n", (int)data->pwm[attr->index]); pwm 718 drivers/hwmon/w83781d.c data->pwm[nr] = clamp_val(val, 0, 255); pwm 719 drivers/hwmon/w83781d.c w83781d_write_value(data, W83781D_REG_PWM[nr], data->pwm[nr]); pwm 1477 drivers/hwmon/w83781d.c data->pwm[i] = pwm 302 drivers/hwmon/w83791d.c u8 pwm[5]; /* pwm duty cycle */ pwm 718 drivers/hwmon/w83791d.c return sprintf(buf, "%u\n", data->pwm[nr]); pwm 734 drivers/hwmon/w83791d.c data->pwm[nr] = clamp_val(val, 0, 255); pwm 735 drivers/hwmon/w83791d.c w83791d_write(client, W83791D_REG_PWM[nr], data->pwm[nr]); pwm 1540 drivers/hwmon/w83791d.c data->pwm[i] = w83791d_read(client, pwm 279 drivers/hwmon/w83792d.c u8 pwm[7]; /* The 7 PWM outputs */ pwm 590 drivers/hwmon/w83792d.c return sprintf(buf, "%d\n", (data->pwm[nr] & 0x0f) << 4); pwm 635 drivers/hwmon/w83792d.c data->pwm[nr] = val; pwm 636 drivers/hwmon/w83792d.c w83792d_write_value(client, W83792D_REG_PWM[nr], data->pwm[nr]); pwm 691 drivers/hwmon/w83792d.c return sprintf(buf, "%d\n", data->pwm[nr] >> 7); pwm 712 drivers/hwmon/w83792d.c data->pwm[nr] = w83792d_read_value(client, W83792D_REG_PWM[nr]); pwm 714 drivers/hwmon/w83792d.c data->pwm[nr] |= 0x80; pwm 716 drivers/hwmon/w83792d.c data->pwm[nr] &= 0x7f; pwm 718 drivers/hwmon/w83792d.c w83792d_write_value(client, W83792D_REG_PWM[nr], data->pwm[nr]); pwm 1521 drivers/hwmon/w83792d.c data->pwm[i] = w83792d_read_value(client, pwm 1628 drivers/hwmon/w83792d.c dev_dbg(dev, "pwm[%d] is: 0x%x\n", i, data->pwm[i]); pwm 239 drivers/hwmon/w83793.c u8 pwm[8][3]; /* Register value */ pwm 522 drivers/hwmon/w83793.c val = (data->pwm[index][nr] & 0x3f) << 2; pwm 552 drivers/hwmon/w83793.c data->pwm[index][nr] = pwm 554 drivers/hwmon/w83793.c data->pwm[index][nr] |= val; pwm 556 drivers/hwmon/w83793.c data->pwm[index][nr]); pwm 1040 drivers/hwmon/w83793.c SENSOR_ATTR_2(pwm##index, S_IWUSR | S_IRUGO, show_pwm, \ pwm 1042 drivers/hwmon/w83793.c SENSOR_ATTR_2(pwm##index##_nonstop, S_IWUSR | S_IRUGO, \ pwm 1044 drivers/hwmon/w83793.c SENSOR_ATTR_2(pwm##index##_start, S_IWUSR | S_IRUGO, \ pwm 1046 drivers/hwmon/w83793.c SENSOR_ATTR_2(pwm##index##_stop_time, S_IWUSR | S_IRUGO, \ pwm 2005 drivers/hwmon/w83793.c for (i = 0; i < ARRAY_SIZE(data->pwm); i++) { pwm 2008 drivers/hwmon/w83793.c data->pwm[i][PWM_NONSTOP] = pwm 2010 drivers/hwmon/w83793.c data->pwm[i][PWM_START] = pwm 2069 drivers/hwmon/w83793.c for (i = 0; i < ARRAY_SIZE(data->pwm); i++) { pwm 2071 drivers/hwmon/w83793.c data->pwm[i][PWM_DUTY] = pwm 359 drivers/hwmon/w83795.c u8 pwm[8][5]; /* pwm 544 drivers/hwmon/w83795.c data->pwm[i][tmp] = pwm 661 drivers/hwmon/w83795.c data->pwm[i][PWM_OUTPUT] = pwm 840 drivers/hwmon/w83795.c val = time_from_reg(data->pwm[index][nr]); pwm 843 drivers/hwmon/w83795.c val = pwm_freq_from_reg(data->pwm[index][nr], data->clkin); pwm 846 drivers/hwmon/w83795.c val = data->pwm[index][nr]; pwm 881 drivers/hwmon/w83795.c data->pwm[index][nr] = val; pwm 1637 drivers/hwmon/w83795.c SENSOR_ATTR_2(pwm##index, S_IWUSR | S_IRUGO, show_pwm, \ pwm 1639 drivers/hwmon/w83795.c SENSOR_ATTR_2(pwm##index##_enable, S_IWUSR | S_IRUGO, \ pwm 1641 drivers/hwmon/w83795.c SENSOR_ATTR_2(pwm##index##_mode, S_IRUGO, \ pwm 1643 drivers/hwmon/w83795.c SENSOR_ATTR_2(pwm##index##_freq, S_IWUSR | S_IRUGO, \ pwm 1645 drivers/hwmon/w83795.c SENSOR_ATTR_2(pwm##index##_nonstop, S_IWUSR | S_IRUGO, \ pwm 1647 drivers/hwmon/w83795.c SENSOR_ATTR_2(pwm##index##_start, S_IWUSR | S_IRUGO, \ pwm 1649 drivers/hwmon/w83795.c SENSOR_ATTR_2(pwm##index##_stop_time, S_IWUSR | S_IRUGO, \ pwm 129 drivers/hwmon/w83l786ng.c u8 pwm[2]; pwm 192 drivers/hwmon/w83l786ng.c data->pwm[i] = pwm 472 drivers/hwmon/w83l786ng.c show_pwm_reg(pwm) pwm 519 drivers/hwmon/w83l786ng.c data->pwm[nr] = val * 0x11; pwm 147 drivers/input/keyboard/lm8323.c struct lm8323_pwm pwm[LM8323_NUM_PWMS]; pwm 351 drivers/input/keyboard/lm8323.c static void pwm_done(struct lm8323_pwm *pwm) pwm 353 drivers/input/keyboard/lm8323.c mutex_lock(&pwm->lock); pwm 354 drivers/input/keyboard/lm8323.c pwm->running = false; pwm 355 drivers/input/keyboard/lm8323.c if (pwm->desired_brightness != pwm->brightness) pwm 356 drivers/input/keyboard/lm8323.c schedule_work(&pwm->work); pwm 357 drivers/input/keyboard/lm8323.c mutex_unlock(&pwm->lock); pwm 392 drivers/input/keyboard/lm8323.c pwm_done(&lm->pwm[i]); pwm 416 drivers/input/keyboard/lm8323.c static void lm8323_write_pwm_one(struct lm8323_pwm *pwm, int pos, u16 cmd) pwm 418 drivers/input/keyboard/lm8323.c lm8323_write(pwm->chip, 4, LM8323_CMD_PWM_WRITE, (pos << 2) | pwm->id, pwm 428 drivers/input/keyboard/lm8323.c static void lm8323_write_pwm(struct lm8323_pwm *pwm, int kill, pwm 434 drivers/input/keyboard/lm8323.c lm8323_write_pwm_one(pwm, i, cmds[i]); pwm 436 drivers/input/keyboard/lm8323.c lm8323_write_pwm_one(pwm, i++, PWM_END(kill)); pwm 437 drivers/input/keyboard/lm8323.c lm8323_write(pwm->chip, 2, LM8323_CMD_START_PWM, pwm->id); pwm 438 drivers/input/keyboard/lm8323.c pwm->running = true; pwm 443 drivers/input/keyboard/lm8323.c struct lm8323_pwm *pwm = work_to_pwm(work); pwm 448 drivers/input/keyboard/lm8323.c mutex_lock(&pwm->lock); pwm 456 drivers/input/keyboard/lm8323.c if (pwm->running || pwm->desired_brightness == pwm->brightness) pwm 459 drivers/input/keyboard/lm8323.c kill = (pwm->desired_brightness == 0); pwm 460 drivers/input/keyboard/lm8323.c up = (pwm->desired_brightness > pwm->brightness); pwm 461 drivers/input/keyboard/lm8323.c steps = abs(pwm->desired_brightness - pwm->brightness); pwm 467 drivers/input/keyboard/lm8323.c if ((pwm->fade_time / steps) > (32768 / 512)) { pwm 475 drivers/input/keyboard/lm8323.c perstep = (hz * pwm->fade_time) / (steps * 1000); pwm 490 drivers/input/keyboard/lm8323.c lm8323_write_pwm(pwm, kill, num_cmds, pwm_cmds); pwm 491 drivers/input/keyboard/lm8323.c pwm->brightness = pwm->desired_brightness; pwm 494 drivers/input/keyboard/lm8323.c mutex_unlock(&pwm->lock); pwm 500 drivers/input/keyboard/lm8323.c struct lm8323_pwm *pwm = cdev_to_pwm(led_cdev); pwm 501 drivers/input/keyboard/lm8323.c struct lm8323_chip *lm = pwm->chip; pwm 503 drivers/input/keyboard/lm8323.c mutex_lock(&pwm->lock); pwm 504 drivers/input/keyboard/lm8323.c pwm->desired_brightness = brightness; pwm 505 drivers/input/keyboard/lm8323.c mutex_unlock(&pwm->lock); pwm 508 drivers/input/keyboard/lm8323.c schedule_work(&pwm->work); pwm 515 drivers/input/keyboard/lm8323.c schedule_work(&pwm->work); pwm 517 drivers/input/keyboard/lm8323.c lm8323_pwm_work(&pwm->work); pwm 526 drivers/input/keyboard/lm8323.c struct lm8323_pwm *pwm = cdev_to_pwm(led_cdev); pwm 528 drivers/input/keyboard/lm8323.c return sprintf(buf, "%d\n", pwm->fade_time); pwm 535 drivers/input/keyboard/lm8323.c struct lm8323_pwm *pwm = cdev_to_pwm(led_cdev); pwm 543 drivers/input/keyboard/lm8323.c pwm->fade_time = time; pwm 558 drivers/input/keyboard/lm8323.c struct lm8323_pwm *pwm; pwm 562 drivers/input/keyboard/lm8323.c pwm = &lm->pwm[id - 1]; pwm 564 drivers/input/keyboard/lm8323.c pwm->id = id; pwm 565 drivers/input/keyboard/lm8323.c pwm->fade_time = 0; pwm 566 drivers/input/keyboard/lm8323.c pwm->brightness = 0; pwm 567 drivers/input/keyboard/lm8323.c pwm->desired_brightness = 0; pwm 568 drivers/input/keyboard/lm8323.c pwm->running = false; pwm 569 drivers/input/keyboard/lm8323.c pwm->enabled = false; pwm 570 drivers/input/keyboard/lm8323.c INIT_WORK(&pwm->work, lm8323_pwm_work); pwm 571 drivers/input/keyboard/lm8323.c mutex_init(&pwm->lock); pwm 572 drivers/input/keyboard/lm8323.c pwm->chip = lm; pwm 575 drivers/input/keyboard/lm8323.c pwm->cdev.name = name; pwm 576 drivers/input/keyboard/lm8323.c pwm->cdev.brightness_set = lm8323_pwm_set_brightness; pwm 577 drivers/input/keyboard/lm8323.c pwm->cdev.groups = lm8323_pwm_groups; pwm 578 drivers/input/keyboard/lm8323.c if (led_classdev_register(dev, &pwm->cdev) < 0) { pwm 582 drivers/input/keyboard/lm8323.c pwm->enabled = true; pwm 624 drivers/input/keyboard/lm8323.c int pwm; pwm 692 drivers/input/keyboard/lm8323.c for (pwm = 0; pwm < LM8323_NUM_PWMS; pwm++) { pwm 693 drivers/input/keyboard/lm8323.c err = init_pwm(lm, pwm + 1, &client->dev, pwm 694 drivers/input/keyboard/lm8323.c pdata->pwm_names[pwm]); pwm 746 drivers/input/keyboard/lm8323.c while (--pwm >= 0) pwm 747 drivers/input/keyboard/lm8323.c if (lm->pwm[pwm].enabled) pwm 748 drivers/input/keyboard/lm8323.c led_classdev_unregister(&lm->pwm[pwm].cdev); pwm 768 drivers/input/keyboard/lm8323.c if (lm->pwm[i].enabled) pwm 769 drivers/input/keyboard/lm8323.c led_classdev_unregister(&lm->pwm[i].cdev); pwm 795 drivers/input/keyboard/lm8323.c if (lm->pwm[i].enabled) pwm 796 drivers/input/keyboard/lm8323.c led_classdev_suspend(&lm->pwm[i].cdev); pwm 812 drivers/input/keyboard/lm8323.c if (lm->pwm[i].enabled) pwm 813 drivers/input/keyboard/lm8323.c led_classdev_resume(&lm->pwm[i].cdev); pwm 44 drivers/input/misc/max8997_haptic.c struct pwm_device *pwm; pwm 62 drivers/input/misc/max8997_haptic.c ret = pwm_config(chip->pwm, duty, chip->pwm_period); pwm 177 drivers/input/misc/max8997_haptic.c error = pwm_enable(chip->pwm); pwm 199 drivers/input/misc/max8997_haptic.c pwm_disable(chip->pwm); pwm 286 drivers/input/misc/max8997_haptic.c chip->pwm = pwm_request(haptic_pdata->pwm_channel_id, pwm 288 drivers/input/misc/max8997_haptic.c if (IS_ERR(chip->pwm)) { pwm 289 drivers/input/misc/max8997_haptic.c error = PTR_ERR(chip->pwm); pwm 300 drivers/input/misc/max8997_haptic.c pwm_apply_args(chip->pwm); pwm 352 drivers/input/misc/max8997_haptic.c pwm_free(chip->pwm); pwm 368 drivers/input/misc/max8997_haptic.c pwm_free(chip->pwm); pwm 20 drivers/input/misc/pwm-beeper.c struct pwm_device *pwm; pwm 36 drivers/input/misc/pwm-beeper.c pwm_get_state(beeper->pwm, &state); pwm 42 drivers/input/misc/pwm-beeper.c error = pwm_apply_state(beeper->pwm, &state); pwm 49 drivers/input/misc/pwm-beeper.c pwm_disable(beeper->pwm); pwm 66 drivers/input/misc/pwm-beeper.c pwm_disable(beeper->pwm); pwm 134 drivers/input/misc/pwm-beeper.c beeper->pwm = devm_pwm_get(dev, NULL); pwm 135 drivers/input/misc/pwm-beeper.c if (IS_ERR(beeper->pwm)) { pwm 136 drivers/input/misc/pwm-beeper.c error = PTR_ERR(beeper->pwm); pwm 144 drivers/input/misc/pwm-beeper.c pwm_init_state(beeper->pwm, &state); pwm 146 drivers/input/misc/pwm-beeper.c error = pwm_apply_state(beeper->pwm, &state); pwm 26 drivers/input/misc/pwm-vibra.c struct pwm_device *pwm; pwm 51 drivers/input/misc/pwm-vibra.c pwm_get_state(vibrator->pwm, &state); pwm 55 drivers/input/misc/pwm-vibra.c err = pwm_apply_state(vibrator->pwm, &state); pwm 69 drivers/input/misc/pwm-vibra.c pwm_disable(vibrator->pwm); pwm 81 drivers/input/misc/pwm-vibra.c pwm_disable(vibrator->pwm); pwm 145 drivers/input/misc/pwm-vibra.c vibrator->pwm = devm_pwm_get(&pdev->dev, "enable"); pwm 146 drivers/input/misc/pwm-vibra.c err = PTR_ERR_OR_ZERO(vibrator->pwm); pwm 157 drivers/input/misc/pwm-vibra.c pwm_init_state(vibrator->pwm, &state); pwm 159 drivers/input/misc/pwm-vibra.c err = pwm_apply_state(vibrator->pwm, &state); pwm 90 drivers/input/misc/twl4030-vibra.c int pwm; pwm 94 drivers/input/misc/twl4030-vibra.c pwm = info->speed; pwm 98 drivers/input/misc/twl4030-vibra.c if (pwm && (!info->coexist || !(reg & TWL4030_VIBRA_SEL))) { pwm 113 drivers/input/misc/twl4030-vibra.c 256 - pwm, TWL4030_REG_VIBRA_SET); pwm 233 drivers/leds/leds-lm3530.c struct lm3530_pwm_data *pwm = &pdata->pwm_data; pwm 289 drivers/leds/leds-lm3530.c if (pwm->pwm_set_intensity) pwm 290 drivers/leds/leds-lm3530.c pwm->pwm_set_intensity(reg_val[i], pwm 311 drivers/leds/leds-lm3530.c struct lm3530_pwm_data *pwm = &pdata->pwm_data; pwm 341 drivers/leds/leds-lm3530.c if (pwm->pwm_set_intensity) pwm 342 drivers/leds/leds-lm3530.c pwm->pwm_set_intensity(brt_val, max_brightness); pwm 373 drivers/leds/leds-lm3530.c struct lm3530_pwm_data *pwm; pwm 378 drivers/leds/leds-lm3530.c pwm = &drvdata->pdata->pwm_data; pwm 389 drivers/leds/leds-lm3530.c if (mode != LM3530_BL_MODE_PWM && pwm->pwm_set_intensity) pwm 390 drivers/leds/leds-lm3530.c pwm->pwm_set_intensity(0, max_brightness); pwm 594 drivers/leds/leds-lm3533.c static LM3533_ATTR_RW(pwm); pwm 644 drivers/leds/leds-lm3533.c return lm3533_ctrlbank_set_pwm(&led->cb, pdata->pwm); pwm 47 drivers/leds/leds-pca9532.c u8 pwm[2]; pwm 114 drivers/leds/leds-pca9532.c static int pca9532_calcpwm(struct i2c_client *client, int pwm, int blink, pwm 121 drivers/leds/leds-pca9532.c data->leds[i].state == PCA9532_PWM0+pwm) { pwm 135 drivers/leds/leds-pca9532.c data->pwm[pwm] = b; pwm 136 drivers/leds/leds-pca9532.c data->psc[pwm] = blink; pwm 140 drivers/leds/leds-pca9532.c static int pca9532_setpwm(struct i2c_client *client, int pwm) pwm 146 drivers/leds/leds-pca9532.c i2c_smbus_write_byte_data(client, PCA9532_REG_PWM(maxleds, pwm), pwm 147 drivers/leds/leds-pca9532.c data->pwm[pwm]); pwm 148 drivers/leds/leds-pca9532.c i2c_smbus_write_byte_data(client, PCA9532_REG_PSC(maxleds, pwm), pwm 149 drivers/leds/leds-pca9532.c data->psc[pwm]); pwm 232 drivers/leds/leds-pca9532.c data->pwm[1] = 127; pwm 234 drivers/leds/leds-pca9532.c data->pwm[1] = 0; pwm 249 drivers/leds/leds-pca9532.c data->pwm[1]); pwm 359 drivers/leds/leds-pca9532.c data->pwm[i] = pdata->pwm[i]; pwm 362 drivers/leds/leds-pca9532.c data->pwm[i]); pwm 24 drivers/leds/leds-pwm.c struct pwm_device *pwm; pwm 39 drivers/leds/leds-pwm.c pwm_config(led_dat->pwm, new_duty, led_dat->period); pwm 42 drivers/leds/leds-pwm.c pwm_disable(led_dat->pwm); pwm 44 drivers/leds/leds-pwm.c pwm_enable(led_dat->pwm); pwm 83 drivers/leds/leds-pwm.c led_data->pwm = devm_fwnode_pwm_get(dev, fwnode, NULL); pwm 85 drivers/leds/leds-pwm.c led_data->pwm = devm_pwm_get(dev, led->name); pwm 86 drivers/leds/leds-pwm.c if (IS_ERR(led_data->pwm)) { pwm 87 drivers/leds/leds-pwm.c ret = PTR_ERR(led_data->pwm); pwm 100 drivers/leds/leds-pwm.c pwm_apply_args(led_data->pwm); pwm 102 drivers/leds/leds-pwm.c pwm_get_args(led_data->pwm, &pargs); pwm 103 drivers/leds/leds-tlc591xx.c u8 pwm = TLC591XX_REG_PWM(led->led_no); pwm 105 drivers/leds/leds-tlc591xx.c return regmap_write(priv->regmap, pwm, brightness); pwm 53 drivers/macintosh/windfarm_smu_controls.c static int smu_set_fan(int pwm, u8 id, u16 value) pwm 80 drivers/macintosh/windfarm_smu_controls.c buffer[0] = pwm ? 0x10 : 0x00; pwm 375 drivers/media/dvb-frontends/atbm8830.c u32 pwm; pwm 382 drivers/media/dvb-frontends/atbm8830.c pwm = t & 0x03; pwm 383 drivers/media/dvb-frontends/atbm8830.c pwm <<= 8; pwm 385 drivers/media/dvb-frontends/atbm8830.c pwm |= t; pwm 389 drivers/media/dvb-frontends/atbm8830.c dprintk("AGC PWM = 0x%02X\n", pwm); pwm 390 drivers/media/dvb-frontends/atbm8830.c pwm = 0x400 - pwm; pwm 392 drivers/media/dvb-frontends/atbm8830.c *signal = pwm * 0x10000 / 0x400; pwm 30 drivers/media/dvb-frontends/tda10021.c u8 pwm; pwm 201 drivers/media/dvb-frontends/tda10021.c _tda10021_writereg (state, 0x34, state->pwm); pwm 277 drivers/media/dvb-frontends/tda10021.c _tda10021_writereg(state, 0x34, state->pwm); pwm 438 drivers/media/dvb-frontends/tda10021.c u8 pwm) pwm 450 drivers/media/dvb-frontends/tda10021.c state->pwm = pwm; pwm 37 drivers/media/dvb-frontends/tda10023.c u8 pwm; pwm 509 drivers/media/dvb-frontends/tda10023.c u8 pwm) pwm 528 drivers/media/dvb-frontends/tda10023.c state->pwm = pwm; pwm 50 drivers/media/dvb-frontends/tda1002x.h struct i2c_adapter* i2c, u8 pwm); pwm 53 drivers/media/dvb-frontends/tda1002x.h struct i2c_adapter* i2c, u8 pwm) pwm 63 drivers/media/dvb-frontends/tda1002x.h struct i2c_adapter *i2c, u8 pwm); pwm 67 drivers/media/dvb-frontends/tda1002x.h struct i2c_adapter *i2c, u8 pwm) pwm 31 drivers/media/dvb-frontends/ves1820.c u8 pwm; pwm 192 drivers/media/dvb-frontends/ves1820.c ves1820_writereg(state, 0x34, state->pwm); pwm 217 drivers/media/dvb-frontends/ves1820.c ves1820_writereg(state, 0x34, state->pwm); pwm 364 drivers/media/dvb-frontends/ves1820.c u8 pwm) pwm 377 drivers/media/dvb-frontends/ves1820.c state->pwm = pwm; pwm 384 drivers/media/dvb-frontends/ves1820.c printk("ves1820: pwm=0x%02x\n", state->pwm); pwm 34 drivers/media/dvb-frontends/ves1820.h struct i2c_adapter* i2c, u8 pwm); pwm 37 drivers/media/dvb-frontends/ves1820.h struct i2c_adapter* i2c, u8 pwm) pwm 3248 drivers/media/pci/ddbridge/ddbridge-core.c u32 temp, temp2, pwm; pwm 3264 drivers/media/pci/ddbridge/ddbridge-core.c pwm = (ddblreadl(link, TEMPMON_FANCONTROL) >> 8) & 0x0F; pwm 3265 drivers/media/pci/ddbridge/ddbridge-core.c if (pwm > 10) pwm 3266 drivers/media/pci/ddbridge/ddbridge-core.c pwm = 10; pwm 3268 drivers/media/pci/ddbridge/ddbridge-core.c if (temp >= link->temp_tab[pwm]) { pwm 3269 drivers/media/pci/ddbridge/ddbridge-core.c while (pwm < 10 && temp >= link->temp_tab[pwm + 1]) pwm 3270 drivers/media/pci/ddbridge/ddbridge-core.c pwm += 1; pwm 3272 drivers/media/pci/ddbridge/ddbridge-core.c while (pwm > 1 && temp < link->temp_tab[pwm - 2]) pwm 3273 drivers/media/pci/ddbridge/ddbridge-core.c pwm -= 1; pwm 3275 drivers/media/pci/ddbridge/ddbridge-core.c ddblwritel(link, (pwm << 8), TEMPMON_FANCONTROL); pwm 43 drivers/media/pci/mantis/mantis_vp2033.c u8 pwm; pwm 46 drivers/media/pci/mantis/mantis_vp2033.c {.addr = 0x50, .flags = I2C_M_RD, .buf = &pwm, .len = 1} pwm 50 drivers/media/pci/mantis/mantis_vp2033.c || (pwm == 0xff)) pwm 51 drivers/media/pci/mantis/mantis_vp2033.c pwm = 0x48; pwm 53 drivers/media/pci/mantis/mantis_vp2033.c return pwm; pwm 99 drivers/media/pci/mantis/mantis_vp2040.c u8 pwm; pwm 102 drivers/media/pci/mantis/mantis_vp2040.c {.addr = 0x50, .flags = I2C_M_RD, .buf = &pwm, .len = 1} pwm 106 drivers/media/pci/mantis/mantis_vp2040.c || (pwm == 0xff)) pwm 107 drivers/media/pci/mantis/mantis_vp2040.c pwm = 0x48; pwm 109 drivers/media/pci/mantis/mantis_vp2040.c return pwm; pwm 2079 drivers/media/pci/ttpci/av7110.c u8 pwm; pwm 2081 drivers/media/pci/ttpci/av7110.c { .addr = 0x50,.flags = I2C_M_RD,.buf = &pwm,.len = 1} }; pwm 2083 drivers/media/pci/ttpci/av7110.c if ((i2c_transfer(&av7110->i2c_adap, msg, 2) != 2) || (pwm == 0xff)) pwm 2084 drivers/media/pci/ttpci/av7110.c pwm = 0x48; pwm 2086 drivers/media/pci/ttpci/av7110.c return pwm; pwm 1154 drivers/media/pci/ttpci/budget-av.c u8 pwm; pwm 1156 drivers/media/pci/ttpci/budget-av.c {.addr = 0x50,.flags = I2C_M_RD,.buf = &pwm,.len = 1} pwm 1160 drivers/media/pci/ttpci/budget-av.c || (pwm == 0xff)) pwm 1161 drivers/media/pci/ttpci/budget-av.c pwm = 0x48; pwm 1163 drivers/media/pci/ttpci/budget-av.c return pwm; pwm 428 drivers/media/pci/ttpci/budget.c u8 pwm; pwm 430 drivers/media/pci/ttpci/budget.c { .addr = 0x50,.flags = I2C_M_RD,.buf = &pwm,.len = 1} }; pwm 432 drivers/media/pci/ttpci/budget.c if ((i2c_transfer(&budget->i2c_adap, msg, 2) != 2) || (pwm == 0xff)) pwm 433 drivers/media/pci/ttpci/budget.c pwm = 0x48; pwm 435 drivers/media/pci/ttpci/budget.c return pwm; pwm 21 drivers/media/rc/ir-rx51.c struct pwm_device *pwm; pwm 35 drivers/media/rc/ir-rx51.c pwm_enable(ir_rx51->pwm); pwm 40 drivers/media/rc/ir-rx51.c pwm_disable(ir_rx51->pwm); pwm 45 drivers/media/rc/ir-rx51.c struct pwm_device *pwm = ir_rx51->pwm; pwm 50 drivers/media/rc/ir-rx51.c pwm_config(pwm, duty, period); pwm 149 drivers/media/rc/ir-rx51.c ir_rx51->pwm = pwm_get(ir_rx51->dev, NULL); pwm 150 drivers/media/rc/ir-rx51.c if (IS_ERR(ir_rx51->pwm)) { pwm 151 drivers/media/rc/ir-rx51.c int res = PTR_ERR(ir_rx51->pwm); pwm 166 drivers/media/rc/ir-rx51.c pwm_put(ir_rx51->pwm); pwm 231 drivers/media/rc/ir-rx51.c struct pwm_device *pwm; pwm 234 drivers/media/rc/ir-rx51.c pwm = pwm_get(&dev->dev, NULL); pwm 235 drivers/media/rc/ir-rx51.c if (IS_ERR(pwm)) { pwm 236 drivers/media/rc/ir-rx51.c int err = PTR_ERR(pwm); pwm 244 drivers/media/rc/ir-rx51.c ir_rx51.freq = DIV_ROUND_CLOSEST(pwm_get_period(pwm), NSEC_PER_SEC); pwm 245 drivers/media/rc/ir-rx51.c pwm_put(pwm); pwm 19 drivers/media/rc/pwm-ir-tx.c struct pwm_device *pwm; pwm 55 drivers/media/rc/pwm-ir-tx.c struct pwm_device *pwm = pwm_ir->pwm; pwm 63 drivers/media/rc/pwm-ir-tx.c pwm_config(pwm, duty, period); pwm 69 drivers/media/rc/pwm-ir-tx.c pwm_disable(pwm); pwm 71 drivers/media/rc/pwm-ir-tx.c pwm_enable(pwm); pwm 79 drivers/media/rc/pwm-ir-tx.c pwm_disable(pwm); pwm 94 drivers/media/rc/pwm-ir-tx.c pwm_ir->pwm = devm_pwm_get(&pdev->dev, NULL); pwm 95 drivers/media/rc/pwm-ir-tx.c if (IS_ERR(pwm_ir->pwm)) pwm 96 drivers/media/rc/pwm-ir-tx.c return PTR_ERR(pwm_ir->pwm); pwm 1375 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 pwm; pwm 1377 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c { .addr = 0x50,.flags = I2C_M_RD,.buf = &pwm,.len = 1} }; pwm 1379 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((i2c_transfer(&ttusb->i2c_adap, msg, 2) != 2) || (pwm == 0xff)) pwm 1380 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c pwm = 0x48; pwm 1382 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c return pwm; pwm 138 drivers/mfd/lm3533-ctrlbank.c lm3533_ctrlbank_set(pwm, PWM); pwm 139 drivers/mfd/lm3533-ctrlbank.c lm3533_ctrlbank_get(pwm, PWM); pwm 8034 drivers/net/ethernet/mellanox/mlxsw/reg.h MLXSW_ITEM32(reg, mfsc, pwm, 0x00, 24, 3); pwm 8043 drivers/net/ethernet/mellanox/mlxsw/reg.h static inline void mlxsw_reg_mfsc_pack(char *payload, u8 pwm, pwm 8047 drivers/net/ethernet/mellanox/mlxsw/reg.h mlxsw_reg_mfsc_pwm_set(payload, pwm); pwm 498 drivers/pinctrl/bcm/pinctrl-ns2-mux.c NS2_PIN_FUNCTION(pwm), pwm 305 drivers/pinctrl/bcm/pinctrl-nsp-mux.c NSP_PIN_FUNCTION(pwm), pwm 149 drivers/pinctrl/pinctrl-as3722.c FUNCTION_GROUP(pwm-in, PWM_INPUT), pwm 150 drivers/pinctrl/pinctrl-as3722.c FUNCTION_GROUP(pwm-out, PWM_OUTPUT), pwm 313 drivers/pinctrl/pinctrl-palmas.c FUNCTION_GROUP(pwm, PWM), \ pwm 1933 drivers/pinctrl/tegra/pinctrl-tegra20.c FUNCTION(pwm), pwm 296 drivers/platform/x86/compal-laptop.c static void set_pwm(int pwm) pwm 298 drivers/platform/x86/compal-laptop.c ec_transaction(PWM_ADDRESS, &pwm_lookup_table[pwm], 1, NULL, 0); pwm 32 drivers/pwm/core.c static struct pwm_device *pwm_to_device(unsigned int pwm) pwm 34 drivers/pwm/core.c return radix_tree_lookup(&pwm_tree, pwm); pwm 37 drivers/pwm/core.c static int alloc_pwms(int pwm, unsigned int count) pwm 42 drivers/pwm/core.c if (pwm >= MAX_PWMS) pwm 45 drivers/pwm/core.c if (pwm >= 0) pwm 46 drivers/pwm/core.c from = pwm; pwm 51 drivers/pwm/core.c if (pwm >= 0 && start != pwm) pwm 65 drivers/pwm/core.c struct pwm_device *pwm = &chip->pwms[i]; pwm 67 drivers/pwm/core.c radix_tree_delete(&pwm_tree, pwm->pwm); pwm 99 drivers/pwm/core.c static int pwm_device_request(struct pwm_device *pwm, const char *label) pwm 103 drivers/pwm/core.c if (test_bit(PWMF_REQUESTED, &pwm->flags)) pwm 106 drivers/pwm/core.c if (!try_module_get(pwm->chip->ops->owner)) pwm 109 drivers/pwm/core.c if (pwm->chip->ops->request) { pwm 110 drivers/pwm/core.c err = pwm->chip->ops->request(pwm->chip, pwm); pwm 112 drivers/pwm/core.c module_put(pwm->chip->ops->owner); pwm 117 drivers/pwm/core.c set_bit(PWMF_REQUESTED, &pwm->flags); pwm 118 drivers/pwm/core.c pwm->label = label; pwm 126 drivers/pwm/core.c struct pwm_device *pwm; pwm 139 drivers/pwm/core.c pwm = pwm_request_from_chip(pc, args->args[0], NULL); pwm 140 drivers/pwm/core.c if (IS_ERR(pwm)) pwm 141 drivers/pwm/core.c return pwm; pwm 143 drivers/pwm/core.c pwm->args.period = args->args[1]; pwm 144 drivers/pwm/core.c pwm->args.polarity = PWM_POLARITY_NORMAL; pwm 147 drivers/pwm/core.c pwm->args.polarity = PWM_POLARITY_INVERSED; pwm 149 drivers/pwm/core.c return pwm; pwm 156 drivers/pwm/core.c struct pwm_device *pwm; pwm 169 drivers/pwm/core.c pwm = pwm_request_from_chip(pc, args->args[0], NULL); pwm 170 drivers/pwm/core.c if (IS_ERR(pwm)) pwm 171 drivers/pwm/core.c return pwm; pwm 173 drivers/pwm/core.c pwm->args.period = args->args[1]; pwm 175 drivers/pwm/core.c return pwm; pwm 204 drivers/pwm/core.c int pwm_set_chip_data(struct pwm_device *pwm, void *data) pwm 206 drivers/pwm/core.c if (!pwm) pwm 209 drivers/pwm/core.c pwm->chip_data = data; pwm 221 drivers/pwm/core.c void *pwm_get_chip_data(struct pwm_device *pwm) pwm 223 drivers/pwm/core.c return pwm ? pwm->chip_data : NULL; pwm 254 drivers/pwm/core.c struct pwm_device *pwm; pwm 270 drivers/pwm/core.c chip->pwms = kcalloc(chip->npwm, sizeof(*pwm), GFP_KERNEL); pwm 279 drivers/pwm/core.c pwm = &chip->pwms[i]; pwm 281 drivers/pwm/core.c pwm->chip = chip; pwm 282 drivers/pwm/core.c pwm->pwm = chip->base + i; pwm 283 drivers/pwm/core.c pwm->hwpwm = i; pwm 284 drivers/pwm/core.c pwm->state.polarity = polarity; pwm 287 drivers/pwm/core.c chip->ops->get_state(chip, pwm, &pwm->state); pwm 289 drivers/pwm/core.c radix_tree_insert(&pwm_tree, pwm->pwm, pwm); pwm 346 drivers/pwm/core.c struct pwm_device *pwm = &chip->pwms[i]; pwm 348 drivers/pwm/core.c if (test_bit(PWMF_REQUESTED, &pwm->flags)) { pwm 377 drivers/pwm/core.c struct pwm_device *pwm_request(int pwm, const char *label) pwm 382 drivers/pwm/core.c if (pwm < 0 || pwm >= MAX_PWMS) pwm 387 drivers/pwm/core.c dev = pwm_to_device(pwm); pwm 418 drivers/pwm/core.c struct pwm_device *pwm; pwm 425 drivers/pwm/core.c pwm = &chip->pwms[index]; pwm 427 drivers/pwm/core.c err = pwm_device_request(pwm, label); pwm 429 drivers/pwm/core.c pwm = ERR_PTR(err); pwm 432 drivers/pwm/core.c return pwm; pwm 442 drivers/pwm/core.c void pwm_free(struct pwm_device *pwm) pwm 444 drivers/pwm/core.c pwm_put(pwm); pwm 453 drivers/pwm/core.c int pwm_apply_state(struct pwm_device *pwm, const struct pwm_state *state) pwm 458 drivers/pwm/core.c if (!pwm || !state || !state->period || pwm 462 drivers/pwm/core.c chip = pwm->chip; pwm 464 drivers/pwm/core.c if (state->period == pwm->state.period && pwm 465 drivers/pwm/core.c state->duty_cycle == pwm->state.duty_cycle && pwm 466 drivers/pwm/core.c state->polarity == pwm->state.polarity && pwm 467 drivers/pwm/core.c state->enabled == pwm->state.enabled) pwm 471 drivers/pwm/core.c err = chip->ops->apply(chip, pwm, state); pwm 475 drivers/pwm/core.c pwm->state = *state; pwm 480 drivers/pwm/core.c if (state->polarity != pwm->state.polarity) { pwm 489 drivers/pwm/core.c if (pwm->state.enabled) { pwm 490 drivers/pwm/core.c chip->ops->disable(chip, pwm); pwm 491 drivers/pwm/core.c pwm->state.enabled = false; pwm 494 drivers/pwm/core.c err = chip->ops->set_polarity(chip, pwm, pwm 499 drivers/pwm/core.c pwm->state.polarity = state->polarity; pwm 502 drivers/pwm/core.c if (state->period != pwm->state.period || pwm 503 drivers/pwm/core.c state->duty_cycle != pwm->state.duty_cycle) { pwm 504 drivers/pwm/core.c err = chip->ops->config(pwm->chip, pwm, pwm 510 drivers/pwm/core.c pwm->state.duty_cycle = state->duty_cycle; pwm 511 drivers/pwm/core.c pwm->state.period = state->period; pwm 514 drivers/pwm/core.c if (state->enabled != pwm->state.enabled) { pwm 516 drivers/pwm/core.c err = chip->ops->enable(chip, pwm); pwm 520 drivers/pwm/core.c chip->ops->disable(chip, pwm); pwm 523 drivers/pwm/core.c pwm->state.enabled = state->enabled; pwm 539 drivers/pwm/core.c int pwm_capture(struct pwm_device *pwm, struct pwm_capture *result, pwm 544 drivers/pwm/core.c if (!pwm || !pwm->chip->ops) pwm 547 drivers/pwm/core.c if (!pwm->chip->ops->capture) pwm 551 drivers/pwm/core.c err = pwm->chip->ops->capture(pwm->chip, pwm, result, timeout); pwm 566 drivers/pwm/core.c int pwm_adjust_config(struct pwm_device *pwm) pwm 571 drivers/pwm/core.c pwm_get_args(pwm, &pargs); pwm 572 drivers/pwm/core.c pwm_get_state(pwm, &state); pwm 587 drivers/pwm/core.c return pwm_apply_state(pwm, &state); pwm 610 drivers/pwm/core.c return pwm_apply_state(pwm, &state); pwm 632 drivers/pwm/core.c struct pwm_device *pwm) pwm 642 drivers/pwm/core.c dev_warn(pwm->chip->dev, pwm 647 drivers/pwm/core.c dl = device_link_add(dev, pwm->chip->dev, DL_FLAG_AUTOREMOVE_CONSUMER); pwm 650 drivers/pwm/core.c dev_name(pwm->chip->dev)); pwm 680 drivers/pwm/core.c struct pwm_device *pwm = NULL; pwm 705 drivers/pwm/core.c pwm = ERR_CAST(pc); pwm 709 drivers/pwm/core.c pwm = pc->of_xlate(pc, &args); pwm 710 drivers/pwm/core.c if (IS_ERR(pwm)) pwm 713 drivers/pwm/core.c dl = pwm_device_link_add(dev, pwm); pwm 716 drivers/pwm/core.c pwm_free(pwm); pwm 717 drivers/pwm/core.c pwm = ERR_CAST(dl); pwm 733 drivers/pwm/core.c pwm->label = con_id; pwm 738 drivers/pwm/core.c return pwm; pwm 783 drivers/pwm/core.c struct pwm_device *pwm = ERR_PTR(-ENODEV); pwm 807 drivers/pwm/core.c pwm = pwm_request_from_chip(chip, args.args[0], NULL); pwm 808 drivers/pwm/core.c if (IS_ERR(pwm)) pwm 809 drivers/pwm/core.c return pwm; pwm 811 drivers/pwm/core.c pwm->args.period = args.args[1]; pwm 812 drivers/pwm/core.c pwm->args.polarity = PWM_POLARITY_NORMAL; pwm 815 drivers/pwm/core.c pwm->args.polarity = PWM_POLARITY_INVERSED; pwm 818 drivers/pwm/core.c return pwm; pwm 873 drivers/pwm/core.c struct pwm_device *pwm; pwm 887 drivers/pwm/core.c pwm = acpi_pwm_get(dev->fwnode); pwm 888 drivers/pwm/core.c if (!IS_ERR(pwm) || PTR_ERR(pwm) != -ENOENT) pwm 889 drivers/pwm/core.c return pwm; pwm 963 drivers/pwm/core.c pwm = pwm_request_from_chip(chip, chosen->index, con_id ?: dev_id); pwm 964 drivers/pwm/core.c if (IS_ERR(pwm)) pwm 965 drivers/pwm/core.c return pwm; pwm 967 drivers/pwm/core.c dl = pwm_device_link_add(dev, pwm); pwm 969 drivers/pwm/core.c pwm_free(pwm); pwm 973 drivers/pwm/core.c pwm->args.period = chosen->period; pwm 974 drivers/pwm/core.c pwm->args.polarity = chosen->polarity; pwm 976 drivers/pwm/core.c return pwm; pwm 984 drivers/pwm/core.c void pwm_put(struct pwm_device *pwm) pwm 986 drivers/pwm/core.c if (!pwm) pwm 991 drivers/pwm/core.c if (!test_and_clear_bit(PWMF_REQUESTED, &pwm->flags)) { pwm 996 drivers/pwm/core.c if (pwm->chip->ops->free) pwm 997 drivers/pwm/core.c pwm->chip->ops->free(pwm->chip, pwm); pwm 999 drivers/pwm/core.c pwm_set_chip_data(pwm, NULL); pwm 1000 drivers/pwm/core.c pwm->label = NULL; pwm 1002 drivers/pwm/core.c module_put(pwm->chip->ops->owner); pwm 1026 drivers/pwm/core.c struct pwm_device **ptr, *pwm; pwm 1032 drivers/pwm/core.c pwm = pwm_get(dev, con_id); pwm 1033 drivers/pwm/core.c if (!IS_ERR(pwm)) { pwm 1034 drivers/pwm/core.c *ptr = pwm; pwm 1040 drivers/pwm/core.c return pwm; pwm 1059 drivers/pwm/core.c struct pwm_device **ptr, *pwm; pwm 1065 drivers/pwm/core.c pwm = of_pwm_get(dev, np, con_id); pwm 1066 drivers/pwm/core.c if (!IS_ERR(pwm)) { pwm 1067 drivers/pwm/core.c *ptr = pwm; pwm 1073 drivers/pwm/core.c return pwm; pwm 1093 drivers/pwm/core.c struct pwm_device **ptr, *pwm = ERR_PTR(-ENODEV); pwm 1100 drivers/pwm/core.c pwm = of_pwm_get(dev, to_of_node(fwnode), con_id); pwm 1102 drivers/pwm/core.c pwm = acpi_pwm_get(fwnode); pwm 1104 drivers/pwm/core.c if (!IS_ERR(pwm)) { pwm 1105 drivers/pwm/core.c *ptr = pwm; pwm 1111 drivers/pwm/core.c return pwm; pwm 1134 drivers/pwm/core.c void devm_pwm_put(struct device *dev, struct pwm_device *pwm) pwm 1136 drivers/pwm/core.c WARN_ON(devres_release(dev, devm_pwm_release, devm_pwm_match, pwm)); pwm 1146 drivers/pwm/core.c struct pwm_device *pwm = &chip->pwms[i]; pwm 1149 drivers/pwm/core.c pwm_get_state(pwm, &state); pwm 1151 drivers/pwm/core.c seq_printf(s, " pwm-%-3d (%-20.20s):", i, pwm->label); pwm 1153 drivers/pwm/core.c if (test_bit(PWMF_REQUESTED, &pwm->flags)) pwm 27 drivers/pwm/pwm-ab8500.c static int ab8500_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 57 drivers/pwm/pwm-ab8500.c static int ab8500_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 66 drivers/pwm/pwm-ab8500.c pwm->label, ret); pwm 70 drivers/pwm/pwm-ab8500.c static void ab8500_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 79 drivers/pwm/pwm-ab8500.c pwm->label, ret); pwm 41 drivers/pwm/pwm-atmel-hlcdc.c static int atmel_hlcdc_pwm_apply(struct pwm_chip *c, struct pwm_device *pwm, pwm 62 drivers/pwm/pwm-atmel-tcb.c struct pwm_device *pwm, pwm 65 drivers/pwm/pwm-atmel-tcb.c struct atmel_tcb_pwm_device *tcbpwm = pwm_get_chip_data(pwm); pwm 73 drivers/pwm/pwm-atmel-tcb.c struct pwm_device *pwm) pwm 79 drivers/pwm/pwm-atmel-tcb.c unsigned group = pwm->hwpwm / 2; pwm 80 drivers/pwm/pwm-atmel-tcb.c unsigned index = pwm->hwpwm % 2; pwm 94 drivers/pwm/pwm-atmel-tcb.c pwm_set_chip_data(pwm, tcbpwm); pwm 125 drivers/pwm/pwm-atmel-tcb.c tcbpwmc->pwms[pwm->hwpwm] = tcbpwm; pwm 130 drivers/pwm/pwm-atmel-tcb.c static void atmel_tcb_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 133 drivers/pwm/pwm-atmel-tcb.c struct atmel_tcb_pwm_device *tcbpwm = pwm_get_chip_data(pwm); pwm 136 drivers/pwm/pwm-atmel-tcb.c clk_disable_unprepare(tc->clk[pwm->hwpwm / 2]); pwm 137 drivers/pwm/pwm-atmel-tcb.c tcbpwmc->pwms[pwm->hwpwm] = NULL; pwm 141 drivers/pwm/pwm-atmel-tcb.c static void atmel_tcb_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 144 drivers/pwm/pwm-atmel-tcb.c struct atmel_tcb_pwm_device *tcbpwm = pwm_get_chip_data(pwm); pwm 147 drivers/pwm/pwm-atmel-tcb.c unsigned group = pwm->hwpwm / 2; pwm 148 drivers/pwm/pwm-atmel-tcb.c unsigned index = pwm->hwpwm % 2; pwm 200 drivers/pwm/pwm-atmel-tcb.c static int atmel_tcb_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 203 drivers/pwm/pwm-atmel-tcb.c struct atmel_tcb_pwm_device *tcbpwm = pwm_get_chip_data(pwm); pwm 206 drivers/pwm/pwm-atmel-tcb.c unsigned group = pwm->hwpwm / 2; pwm 207 drivers/pwm/pwm-atmel-tcb.c unsigned index = pwm->hwpwm % 2; pwm 283 drivers/pwm/pwm-atmel-tcb.c static int atmel_tcb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 287 drivers/pwm/pwm-atmel-tcb.c struct atmel_tcb_pwm_device *tcbpwm = pwm_get_chip_data(pwm); pwm 288 drivers/pwm/pwm-atmel-tcb.c unsigned group = pwm->hwpwm / 2; pwm 289 drivers/pwm/pwm-atmel-tcb.c unsigned index = pwm->hwpwm % 2; pwm 334 drivers/pwm/pwm-atmel-tcb.c atcbpwm = tcbpwmc->pwms[pwm->hwpwm + 1]; pwm 336 drivers/pwm/pwm-atmel-tcb.c atcbpwm = tcbpwmc->pwms[pwm->hwpwm - 1]; pwm 363 drivers/pwm/pwm-atmel-tcb.c if (pwm_is_enabled(pwm)) pwm 364 drivers/pwm/pwm-atmel-tcb.c atmel_tcb_pwm_enable(chip, pwm); pwm 146 drivers/pwm/pwm-atmel.c static void atmel_pwm_update_cdty(struct pwm_chip *chip, struct pwm_device *pwm, pwm 154 drivers/pwm/pwm-atmel.c val = atmel_pwm_ch_readl(atmel_pwm, pwm->hwpwm, PWM_CMR); pwm 156 drivers/pwm/pwm-atmel.c atmel_pwm_ch_writel(atmel_pwm, pwm->hwpwm, PWM_CMR, val); pwm 159 drivers/pwm/pwm-atmel.c atmel_pwm_ch_writel(atmel_pwm, pwm->hwpwm, pwm 164 drivers/pwm/pwm-atmel.c struct pwm_device *pwm, pwm 169 drivers/pwm/pwm-atmel.c atmel_pwm_ch_writel(atmel_pwm, pwm->hwpwm, pwm 171 drivers/pwm/pwm-atmel.c atmel_pwm_ch_writel(atmel_pwm, pwm->hwpwm, pwm 175 drivers/pwm/pwm-atmel.c static void atmel_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm, pwm 188 drivers/pwm/pwm-atmel.c while (!(atmel_pwm->updated_pwms & (1 << pwm->hwpwm)) && pwm 195 drivers/pwm/pwm-atmel.c atmel_pwm_writel(atmel_pwm, PWM_DIS, 1 << pwm->hwpwm); pwm 203 drivers/pwm/pwm-atmel.c while ((atmel_pwm_readl(atmel_pwm, PWM_SR) & (1 << pwm->hwpwm)) && pwm 211 drivers/pwm/pwm-atmel.c static int atmel_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 220 drivers/pwm/pwm-atmel.c pwm_get_state(pwm, &cstate); pwm 226 drivers/pwm/pwm-atmel.c cprd = atmel_pwm_ch_readl(atmel_pwm, pwm->hwpwm, pwm 229 drivers/pwm/pwm-atmel.c atmel_pwm_update_cdty(chip, pwm, cdty); pwm 244 drivers/pwm/pwm-atmel.c atmel_pwm_disable(chip, pwm, false); pwm 254 drivers/pwm/pwm-atmel.c val = atmel_pwm_ch_readl(atmel_pwm, pwm->hwpwm, PWM_CMR); pwm 260 drivers/pwm/pwm-atmel.c atmel_pwm_ch_writel(atmel_pwm, pwm->hwpwm, PWM_CMR, val); pwm 261 drivers/pwm/pwm-atmel.c atmel_pwm_set_cprd_cdty(chip, pwm, cprd, cdty); pwm 264 drivers/pwm/pwm-atmel.c atmel_pwm->updated_pwms &= ~(1 << pwm->hwpwm); pwm 266 drivers/pwm/pwm-atmel.c atmel_pwm_writel(atmel_pwm, PWM_ENA, 1 << pwm->hwpwm); pwm 268 drivers/pwm/pwm-atmel.c atmel_pwm_disable(chip, pwm, true); pwm 81 drivers/pwm/pwm-bcm-iproc.c static void iproc_pwmc_get_state(struct pwm_chip *chip, struct pwm_device *pwm, pwm 92 drivers/pwm/pwm-bcm-iproc.c if (value & BIT(IPROC_PWM_CTRL_EN_SHIFT(pwm->hwpwm))) pwm 97 drivers/pwm/pwm-bcm-iproc.c if (value & BIT(IPROC_PWM_CTRL_POLARITY_SHIFT(pwm->hwpwm))) pwm 103 drivers/pwm/pwm-bcm-iproc.c prescale = value >> IPROC_PWM_PRESCALE_SHIFT(pwm->hwpwm); pwm 108 drivers/pwm/pwm-bcm-iproc.c value = readl(ip->base + IPROC_PWM_PERIOD_OFFSET(pwm->hwpwm)); pwm 112 drivers/pwm/pwm-bcm-iproc.c value = readl(ip->base + IPROC_PWM_DUTY_CYCLE_OFFSET(pwm->hwpwm)); pwm 117 drivers/pwm/pwm-bcm-iproc.c static int iproc_pwmc_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 159 drivers/pwm/pwm-bcm-iproc.c iproc_pwmc_disable(ip, pwm->hwpwm); pwm 163 drivers/pwm/pwm-bcm-iproc.c value &= ~IPROC_PWM_PRESCALE_MASK(pwm->hwpwm); pwm 164 drivers/pwm/pwm-bcm-iproc.c value |= prescale << IPROC_PWM_PRESCALE_SHIFT(pwm->hwpwm); pwm 168 drivers/pwm/pwm-bcm-iproc.c writel(period, ip->base + IPROC_PWM_PERIOD_OFFSET(pwm->hwpwm)); pwm 169 drivers/pwm/pwm-bcm-iproc.c writel(duty, ip->base + IPROC_PWM_DUTY_CYCLE_OFFSET(pwm->hwpwm)); pwm 175 drivers/pwm/pwm-bcm-iproc.c value |= 1 << IPROC_PWM_CTRL_POLARITY_SHIFT(pwm->hwpwm); pwm 177 drivers/pwm/pwm-bcm-iproc.c value &= ~(1 << IPROC_PWM_CTRL_POLARITY_SHIFT(pwm->hwpwm)); pwm 182 drivers/pwm/pwm-bcm-iproc.c iproc_pwmc_enable(ip, pwm->hwpwm); pwm 111 drivers/pwm/pwm-bcm-kona.c static int kona_pwmc_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 117 drivers/pwm/pwm-bcm-kona.c unsigned int value, chan = pwm->hwpwm; pwm 158 drivers/pwm/pwm-bcm-kona.c if (pwm_is_enabled(pwm)) { pwm 176 drivers/pwm/pwm-bcm-kona.c static int kona_pwmc_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm, pwm 180 drivers/pwm/pwm-bcm-kona.c unsigned int chan = pwm->hwpwm; pwm 208 drivers/pwm/pwm-bcm-kona.c static int kona_pwmc_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 219 drivers/pwm/pwm-bcm-kona.c ret = kona_pwmc_config(chip, pwm, pwm_get_duty_cycle(pwm), pwm 220 drivers/pwm/pwm-bcm-kona.c pwm_get_period(pwm)); pwm 229 drivers/pwm/pwm-bcm-kona.c static void kona_pwmc_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 232 drivers/pwm/pwm-bcm-kona.c unsigned int chan = pwm->hwpwm; pwm 38 drivers/pwm/pwm-bcm2835.c static int bcm2835_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 44 drivers/pwm/pwm-bcm2835.c value &= ~(PWM_CONTROL_MASK << PWM_CONTROL_SHIFT(pwm->hwpwm)); pwm 45 drivers/pwm/pwm-bcm2835.c value |= (PWM_MODE << PWM_CONTROL_SHIFT(pwm->hwpwm)); pwm 51 drivers/pwm/pwm-bcm2835.c static void bcm2835_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 57 drivers/pwm/pwm-bcm2835.c value &= ~(PWM_CONTROL_MASK << PWM_CONTROL_SHIFT(pwm->hwpwm)); pwm 61 drivers/pwm/pwm-bcm2835.c static int bcm2835_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 81 drivers/pwm/pwm-bcm2835.c pc->base + DUTY(pwm->hwpwm)); pwm 82 drivers/pwm/pwm-bcm2835.c writel(period, pc->base + PERIOD(pwm->hwpwm)); pwm 87 drivers/pwm/pwm-bcm2835.c static int bcm2835_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 93 drivers/pwm/pwm-bcm2835.c value |= PWM_ENABLE << PWM_CONTROL_SHIFT(pwm->hwpwm); pwm 99 drivers/pwm/pwm-bcm2835.c static void bcm2835_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 105 drivers/pwm/pwm-bcm2835.c value &= ~(PWM_ENABLE << PWM_CONTROL_SHIFT(pwm->hwpwm)); pwm 109 drivers/pwm/pwm-bcm2835.c static int bcm2835_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm, pwm 118 drivers/pwm/pwm-bcm2835.c value &= ~(PWM_POLARITY << PWM_CONTROL_SHIFT(pwm->hwpwm)); pwm 120 drivers/pwm/pwm-bcm2835.c value |= PWM_POLARITY << PWM_CONTROL_SHIFT(pwm->hwpwm); pwm 72 drivers/pwm/pwm-berlin.c static int berlin_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 80 drivers/pwm/pwm-berlin.c return pwm_set_chip_data(pwm, channel); pwm 83 drivers/pwm/pwm-berlin.c static void berlin_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 85 drivers/pwm/pwm-berlin.c struct berlin_pwm_channel *channel = pwm_get_chip_data(pwm); pwm 93 drivers/pwm/pwm-berlin.c struct berlin_pwm_chip *pwm = to_berlin_pwm_chip(chip); pwm 98 drivers/pwm/pwm-berlin.c cycles = clk_get_rate(pwm->clk); pwm 115 drivers/pwm/pwm-berlin.c value = berlin_pwm_readl(pwm, pwm_dev->hwpwm, BERLIN_PWM_CONTROL); pwm 120 drivers/pwm/pwm-berlin.c berlin_pwm_writel(pwm, pwm_dev->hwpwm, value, BERLIN_PWM_CONTROL); pwm 122 drivers/pwm/pwm-berlin.c berlin_pwm_writel(pwm, pwm_dev->hwpwm, duty, BERLIN_PWM_DUTY); pwm 123 drivers/pwm/pwm-berlin.c berlin_pwm_writel(pwm, pwm_dev->hwpwm, period, BERLIN_PWM_TCNT); pwm 132 drivers/pwm/pwm-berlin.c struct berlin_pwm_chip *pwm = to_berlin_pwm_chip(chip); pwm 135 drivers/pwm/pwm-berlin.c value = berlin_pwm_readl(pwm, pwm_dev->hwpwm, BERLIN_PWM_CONTROL); pwm 142 drivers/pwm/pwm-berlin.c berlin_pwm_writel(pwm, pwm_dev->hwpwm, value, BERLIN_PWM_CONTROL); pwm 149 drivers/pwm/pwm-berlin.c struct berlin_pwm_chip *pwm = to_berlin_pwm_chip(chip); pwm 152 drivers/pwm/pwm-berlin.c value = berlin_pwm_readl(pwm, pwm_dev->hwpwm, BERLIN_PWM_EN); pwm 154 drivers/pwm/pwm-berlin.c berlin_pwm_writel(pwm, pwm_dev->hwpwm, value, BERLIN_PWM_EN); pwm 162 drivers/pwm/pwm-berlin.c struct berlin_pwm_chip *pwm = to_berlin_pwm_chip(chip); pwm 165 drivers/pwm/pwm-berlin.c value = berlin_pwm_readl(pwm, pwm_dev->hwpwm, BERLIN_PWM_EN); pwm 167 drivers/pwm/pwm-berlin.c berlin_pwm_writel(pwm, pwm_dev->hwpwm, value, BERLIN_PWM_EN); pwm 188 drivers/pwm/pwm-berlin.c struct berlin_pwm_chip *pwm; pwm 192 drivers/pwm/pwm-berlin.c pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); pwm 193 drivers/pwm/pwm-berlin.c if (!pwm) pwm 197 drivers/pwm/pwm-berlin.c pwm->base = devm_ioremap_resource(&pdev->dev, res); pwm 198 drivers/pwm/pwm-berlin.c if (IS_ERR(pwm->base)) pwm 199 drivers/pwm/pwm-berlin.c return PTR_ERR(pwm->base); pwm 201 drivers/pwm/pwm-berlin.c pwm->clk = devm_clk_get(&pdev->dev, NULL); pwm 202 drivers/pwm/pwm-berlin.c if (IS_ERR(pwm->clk)) pwm 203 drivers/pwm/pwm-berlin.c return PTR_ERR(pwm->clk); pwm 205 drivers/pwm/pwm-berlin.c ret = clk_prepare_enable(pwm->clk); pwm 209 drivers/pwm/pwm-berlin.c pwm->chip.dev = &pdev->dev; pwm 210 drivers/pwm/pwm-berlin.c pwm->chip.ops = &berlin_pwm_ops; pwm 211 drivers/pwm/pwm-berlin.c pwm->chip.base = -1; pwm 212 drivers/pwm/pwm-berlin.c pwm->chip.npwm = 4; pwm 213 drivers/pwm/pwm-berlin.c pwm->chip.of_xlate = of_pwm_xlate_with_flags; pwm 214 drivers/pwm/pwm-berlin.c pwm->chip.of_pwm_n_cells = 3; pwm 216 drivers/pwm/pwm-berlin.c ret = pwmchip_add(&pwm->chip); pwm 219 drivers/pwm/pwm-berlin.c clk_disable_unprepare(pwm->clk); pwm 223 drivers/pwm/pwm-berlin.c platform_set_drvdata(pdev, pwm); pwm 230 drivers/pwm/pwm-berlin.c struct berlin_pwm_chip *pwm = platform_get_drvdata(pdev); pwm 233 drivers/pwm/pwm-berlin.c ret = pwmchip_remove(&pwm->chip); pwm 234 drivers/pwm/pwm-berlin.c clk_disable_unprepare(pwm->clk); pwm 242 drivers/pwm/pwm-berlin.c struct berlin_pwm_chip *pwm = dev_get_drvdata(dev); pwm 245 drivers/pwm/pwm-berlin.c for (i = 0; i < pwm->chip.npwm; i++) { pwm 248 drivers/pwm/pwm-berlin.c channel = pwm_get_chip_data(&pwm->chip.pwms[i]); pwm 252 drivers/pwm/pwm-berlin.c channel->enable = berlin_pwm_readl(pwm, i, BERLIN_PWM_ENABLE); pwm 253 drivers/pwm/pwm-berlin.c channel->ctrl = berlin_pwm_readl(pwm, i, BERLIN_PWM_CONTROL); pwm 254 drivers/pwm/pwm-berlin.c channel->duty = berlin_pwm_readl(pwm, i, BERLIN_PWM_DUTY); pwm 255 drivers/pwm/pwm-berlin.c channel->tcnt = berlin_pwm_readl(pwm, i, BERLIN_PWM_TCNT); pwm 258 drivers/pwm/pwm-berlin.c clk_disable_unprepare(pwm->clk); pwm 265 drivers/pwm/pwm-berlin.c struct berlin_pwm_chip *pwm = dev_get_drvdata(dev); pwm 269 drivers/pwm/pwm-berlin.c ret = clk_prepare_enable(pwm->clk); pwm 273 drivers/pwm/pwm-berlin.c for (i = 0; i < pwm->chip.npwm; i++) { pwm 276 drivers/pwm/pwm-berlin.c channel = pwm_get_chip_data(&pwm->chip.pwms[i]); pwm 280 drivers/pwm/pwm-berlin.c berlin_pwm_writel(pwm, i, channel->ctrl, BERLIN_PWM_CONTROL); pwm 281 drivers/pwm/pwm-berlin.c berlin_pwm_writel(pwm, i, channel->duty, BERLIN_PWM_DUTY); pwm 282 drivers/pwm/pwm-berlin.c berlin_pwm_writel(pwm, i, channel->tcnt, BERLIN_PWM_TCNT); pwm 283 drivers/pwm/pwm-berlin.c berlin_pwm_writel(pwm, i, channel->enable, BERLIN_PWM_ENABLE); pwm 97 drivers/pwm/pwm-brcmstb.c static int brcmstb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 102 drivers/pwm/pwm-brcmstb.c unsigned int channel = pwm->hwpwm; pwm 205 drivers/pwm/pwm-brcmstb.c static int brcmstb_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 209 drivers/pwm/pwm-brcmstb.c brcmstb_pwm_enable_set(p, pwm->hwpwm, true); pwm 214 drivers/pwm/pwm-brcmstb.c static void brcmstb_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 218 drivers/pwm/pwm-brcmstb.c brcmstb_pwm_enable_set(p, pwm->hwpwm, false); pwm 43 drivers/pwm/pwm-clps711x.c static unsigned int clps711x_get_duty(struct pwm_device *pwm, unsigned int v) pwm 46 drivers/pwm/pwm-clps711x.c return DIV_ROUND_CLOSEST(v * 0xf, pwm->args.period); pwm 49 drivers/pwm/pwm-clps711x.c static int clps711x_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 58 drivers/pwm/pwm-clps711x.c pwm->args.period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, freq); pwm 63 drivers/pwm/pwm-clps711x.c static int clps711x_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 69 drivers/pwm/pwm-clps711x.c if (period_ns != pwm->args.period) pwm 72 drivers/pwm/pwm-clps711x.c duty = clps711x_get_duty(pwm, duty_ns); pwm 73 drivers/pwm/pwm-clps711x.c clps711x_pwm_update_val(priv, pwm->hwpwm, duty); pwm 78 drivers/pwm/pwm-clps711x.c static int clps711x_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 83 drivers/pwm/pwm-clps711x.c duty = clps711x_get_duty(pwm, pwm_get_duty_cycle(pwm)); pwm 84 drivers/pwm/pwm-clps711x.c clps711x_pwm_update_val(priv, pwm->hwpwm, duty); pwm 89 drivers/pwm/pwm-clps711x.c static void clps711x_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 93 drivers/pwm/pwm-clps711x.c clps711x_pwm_update_val(priv, pwm->hwpwm, 0); pwm 42 drivers/pwm/pwm-crc.c static int crc_pwm_enable(struct pwm_chip *c, struct pwm_device *pwm) pwm 51 drivers/pwm/pwm-crc.c static void crc_pwm_disable(struct pwm_chip *c, struct pwm_device *pwm) pwm 58 drivers/pwm/pwm-crc.c static int crc_pwm_config(struct pwm_chip *c, struct pwm_device *pwm, pwm 70 drivers/pwm/pwm-crc.c if (pwm_get_period(pwm) != period_ns) { pwm 74 drivers/pwm/pwm-crc.c crc_pwm_disable(c, pwm); pwm 81 drivers/pwm/pwm-crc.c crc_pwm_enable(c, pwm); pwm 99 drivers/pwm/pwm-crc.c struct crystalcove_pwm *pwm; pwm 103 drivers/pwm/pwm-crc.c pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); pwm 104 drivers/pwm/pwm-crc.c if (!pwm) pwm 107 drivers/pwm/pwm-crc.c pwm->chip.dev = &pdev->dev; pwm 108 drivers/pwm/pwm-crc.c pwm->chip.ops = &crc_pwm_ops; pwm 109 drivers/pwm/pwm-crc.c pwm->chip.base = -1; pwm 110 drivers/pwm/pwm-crc.c pwm->chip.npwm = 1; pwm 113 drivers/pwm/pwm-crc.c pwm->regmap = pmic->regmap; pwm 115 drivers/pwm/pwm-crc.c platform_set_drvdata(pdev, pwm); pwm 117 drivers/pwm/pwm-crc.c return pwmchip_add(&pwm->chip); pwm 122 drivers/pwm/pwm-crc.c struct crystalcove_pwm *pwm = platform_get_drvdata(pdev); pwm 124 drivers/pwm/pwm-crc.c return pwmchip_remove(&pwm->chip); pwm 95 drivers/pwm/pwm-cros-ec.c static int cros_ec_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 111 drivers/pwm/pwm-cros-ec.c return cros_ec_pwm_set_duty(ec_pwm->ec, pwm->hwpwm, duty_cycle); pwm 114 drivers/pwm/pwm-cros-ec.c static void cros_ec_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, pwm 120 drivers/pwm/pwm-cros-ec.c ret = cros_ec_pwm_get_duty(ec_pwm->ec, pwm->hwpwm); pwm 136 drivers/pwm/pwm-cros-ec.c struct pwm_device *pwm; pwm 141 drivers/pwm/pwm-cros-ec.c pwm = pwm_request_from_chip(pc, args->args[0], NULL); pwm 142 drivers/pwm/pwm-cros-ec.c if (IS_ERR(pwm)) pwm 143 drivers/pwm/pwm-cros-ec.c return pwm; pwm 146 drivers/pwm/pwm-cros-ec.c pwm->args.period = EC_PWM_MAX_DUTY; pwm 148 drivers/pwm/pwm-cros-ec.c return pwm; pwm 47 drivers/pwm/pwm-ep93xx.c static int ep93xx_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 54 drivers/pwm/pwm-ep93xx.c static void ep93xx_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 61 drivers/pwm/pwm-ep93xx.c static int ep93xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 76 drivers/pwm/pwm-ep93xx.c if (!pwm_is_enabled(pwm)) { pwm 107 drivers/pwm/pwm-ep93xx.c if (!pwm_is_enabled(pwm)) pwm 113 drivers/pwm/pwm-ep93xx.c static int ep93xx_pwm_polarity(struct pwm_chip *chip, struct pwm_device *pwm, pwm 137 drivers/pwm/pwm-ep93xx.c static int ep93xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 151 drivers/pwm/pwm-ep93xx.c static void ep93xx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 89 drivers/pwm/pwm-fsl-ftm.c static int fsl_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 97 drivers/pwm/pwm-fsl-ftm.c regmap_update_bits(fpc->regmap, FTM_SC, BIT(pwm->hwpwm + 16), pwm 98 drivers/pwm/pwm-fsl-ftm.c BIT(pwm->hwpwm + 16)); pwm 105 drivers/pwm/pwm-fsl-ftm.c static void fsl_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 111 drivers/pwm/pwm-fsl-ftm.c regmap_update_bits(fpc->regmap, FTM_SC, BIT(pwm->hwpwm + 16), pwm 205 drivers/pwm/pwm-fsl-ftm.c struct pwm_device *pwm) pwm 217 drivers/pwm/pwm-fsl-ftm.c struct pwm_device *pwm) pwm 222 drivers/pwm/pwm-fsl-ftm.c if (~(val | BIT(pwm->hwpwm)) & 0xFF) pwm 229 drivers/pwm/pwm-fsl-ftm.c struct pwm_device *pwm, pwm 243 drivers/pwm/pwm-fsl-ftm.c if (!fsl_pwm_is_any_pwm_enabled(fpc, pwm)) pwm 252 drivers/pwm/pwm-fsl-ftm.c if (fsl_pwm_is_other_pwm_enabled(fpc, pwm)) { pwm 255 drivers/pwm/pwm-fsl-ftm.c pwm->hwpwm); pwm 285 drivers/pwm/pwm-fsl-ftm.c regmap_write(fpc->regmap, FTM_CSC(pwm->hwpwm), pwm 287 drivers/pwm/pwm-fsl-ftm.c regmap_write(fpc->regmap, FTM_CV(pwm->hwpwm), duty); pwm 291 drivers/pwm/pwm-fsl-ftm.c reg_polarity = BIT(pwm->hwpwm); pwm 293 drivers/pwm/pwm-fsl-ftm.c regmap_update_bits(fpc->regmap, FTM_POL, BIT(pwm->hwpwm), reg_polarity); pwm 300 drivers/pwm/pwm-fsl-ftm.c static int fsl_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 304 drivers/pwm/pwm-fsl-ftm.c struct pwm_state *oldstate = &pwm->state; pwm 321 drivers/pwm/pwm-fsl-ftm.c BIT(pwm->hwpwm), BIT(pwm->hwpwm)); pwm 329 drivers/pwm/pwm-fsl-ftm.c ret = fsl_pwm_apply_config(fpc, pwm, newstate); pwm 345 drivers/pwm/pwm-fsl-ftm.c regmap_update_bits(fpc->regmap, FTM_OUTMASK, BIT(pwm->hwpwm), pwm 489 drivers/pwm/pwm-fsl-ftm.c struct pwm_device *pwm = &fpc->chip.pwms[i]; pwm 491 drivers/pwm/pwm-fsl-ftm.c if (!test_bit(PWMF_REQUESTED, &pwm->flags)) pwm 496 drivers/pwm/pwm-fsl-ftm.c if (!pwm_is_enabled(pwm)) pwm 512 drivers/pwm/pwm-fsl-ftm.c struct pwm_device *pwm = &fpc->chip.pwms[i]; pwm 514 drivers/pwm/pwm-fsl-ftm.c if (!test_bit(PWMF_REQUESTED, &pwm->flags)) pwm 519 drivers/pwm/pwm-fsl-ftm.c if (!pwm_is_enabled(pwm)) pwm 83 drivers/pwm/pwm-hibvt.c static void hibvt_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 87 drivers/pwm/pwm-hibvt.c hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm->hwpwm), pwm 91 drivers/pwm/pwm-hibvt.c static void hibvt_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 95 drivers/pwm/pwm-hibvt.c hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm->hwpwm), pwm 99 drivers/pwm/pwm-hibvt.c static void hibvt_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 110 drivers/pwm/pwm-hibvt.c hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CFG0_ADDR(pwm->hwpwm), pwm 113 drivers/pwm/pwm-hibvt.c hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CFG1_ADDR(pwm->hwpwm), pwm 118 drivers/pwm/pwm-hibvt.c struct pwm_device *pwm, pwm 124 drivers/pwm/pwm-hibvt.c hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm->hwpwm), pwm 127 drivers/pwm/pwm-hibvt.c hibvt_pwm_set_bits(hi_pwm_chip->base, PWM_CTRL_ADDR(pwm->hwpwm), pwm 131 drivers/pwm/pwm-hibvt.c static void hibvt_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, pwm 141 drivers/pwm/pwm-hibvt.c value = readl(base + PWM_CFG0_ADDR(pwm->hwpwm)); pwm 144 drivers/pwm/pwm-hibvt.c value = readl(base + PWM_CFG1_ADDR(pwm->hwpwm)); pwm 147 drivers/pwm/pwm-hibvt.c value = readl(base + PWM_CTRL_ADDR(pwm->hwpwm)); pwm 151 drivers/pwm/pwm-hibvt.c static int hibvt_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 156 drivers/pwm/pwm-hibvt.c if (state->polarity != pwm->state.polarity) pwm 157 drivers/pwm/pwm-hibvt.c hibvt_pwm_set_polarity(chip, pwm, state->polarity); pwm 159 drivers/pwm/pwm-hibvt.c if (state->period != pwm->state.period || pwm 160 drivers/pwm/pwm-hibvt.c state->duty_cycle != pwm->state.duty_cycle) { pwm 161 drivers/pwm/pwm-hibvt.c hibvt_pwm_config(chip, pwm, state->duty_cycle, state->period); pwm 168 drivers/pwm/pwm-hibvt.c hibvt_pwm_enable(chip, pwm); pwm 171 drivers/pwm/pwm-hibvt.c if (state->enabled != pwm->state.enabled) { pwm 173 drivers/pwm/pwm-hibvt.c hibvt_pwm_enable(chip, pwm); pwm 175 drivers/pwm/pwm-hibvt.c hibvt_pwm_disable(chip, pwm); pwm 92 drivers/pwm/pwm-img.c static int img_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 136 drivers/pwm/pwm-img.c val &= ~(PWM_CTRL_CFG_DIV_MASK << PWM_CTRL_CFG_DIV_SHIFT(pwm->hwpwm)); pwm 138 drivers/pwm/pwm-img.c PWM_CTRL_CFG_DIV_SHIFT(pwm->hwpwm); pwm 143 drivers/pwm/pwm-img.c img_pwm_writel(pwm_chip, PWM_CH_CFG(pwm->hwpwm), val); pwm 151 drivers/pwm/pwm-img.c static int img_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 162 drivers/pwm/pwm-img.c val |= BIT(pwm->hwpwm); pwm 167 drivers/pwm/pwm-img.c PERIP_PWM_PDM_CONTROL_CH_SHIFT(pwm->hwpwm), 0); pwm 172 drivers/pwm/pwm-img.c static void img_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 178 drivers/pwm/pwm-img.c val &= ~BIT(pwm->hwpwm); pwm 242 drivers/pwm/pwm-img.c struct img_pwm_chip *pwm; pwm 245 drivers/pwm/pwm-img.c pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); pwm 246 drivers/pwm/pwm-img.c if (!pwm) pwm 249 drivers/pwm/pwm-img.c pwm->dev = &pdev->dev; pwm 252 drivers/pwm/pwm-img.c pwm->base = devm_ioremap_resource(&pdev->dev, res); pwm 253 drivers/pwm/pwm-img.c if (IS_ERR(pwm->base)) pwm 254 drivers/pwm/pwm-img.c return PTR_ERR(pwm->base); pwm 259 drivers/pwm/pwm-img.c pwm->data = of_dev_id->data; pwm 261 drivers/pwm/pwm-img.c pwm->periph_regs = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, pwm 263 drivers/pwm/pwm-img.c if (IS_ERR(pwm->periph_regs)) pwm 264 drivers/pwm/pwm-img.c return PTR_ERR(pwm->periph_regs); pwm 266 drivers/pwm/pwm-img.c pwm->sys_clk = devm_clk_get(&pdev->dev, "sys"); pwm 267 drivers/pwm/pwm-img.c if (IS_ERR(pwm->sys_clk)) { pwm 269 drivers/pwm/pwm-img.c return PTR_ERR(pwm->sys_clk); pwm 272 drivers/pwm/pwm-img.c pwm->pwm_clk = devm_clk_get(&pdev->dev, "pwm"); pwm 273 drivers/pwm/pwm-img.c if (IS_ERR(pwm->pwm_clk)) { pwm 275 drivers/pwm/pwm-img.c return PTR_ERR(pwm->pwm_clk); pwm 287 drivers/pwm/pwm-img.c clk_rate = clk_get_rate(pwm->pwm_clk); pwm 295 drivers/pwm/pwm-img.c val = (u64)NSEC_PER_SEC * 512 * pwm->data->max_timebase; pwm 297 drivers/pwm/pwm-img.c pwm->max_period_ns = val; pwm 301 drivers/pwm/pwm-img.c pwm->min_period_ns = val; pwm 303 drivers/pwm/pwm-img.c pwm->chip.dev = &pdev->dev; pwm 304 drivers/pwm/pwm-img.c pwm->chip.ops = &img_pwm_ops; pwm 305 drivers/pwm/pwm-img.c pwm->chip.base = -1; pwm 306 drivers/pwm/pwm-img.c pwm->chip.npwm = IMG_PWM_NPWM; pwm 308 drivers/pwm/pwm-img.c ret = pwmchip_add(&pwm->chip); pwm 314 drivers/pwm/pwm-img.c platform_set_drvdata(pdev, pwm); pwm 138 drivers/pwm/pwm-imx-tpm.c struct pwm_device *pwm, pwm 152 drivers/pwm/pwm-imx-tpm.c tmp = readl(tpm->base + PWM_IMX_TPM_CnV(pwm->hwpwm)); pwm 157 drivers/pwm/pwm-imx-tpm.c val = readl(tpm->base + PWM_IMX_TPM_CnSC(pwm->hwpwm)); pwm 175 drivers/pwm/pwm-imx-tpm.c struct pwm_device *pwm) pwm 218 drivers/pwm/pwm-imx-tpm.c pwm_imx_tpm_get_state(chip, pwm, &c); pwm 233 drivers/pwm/pwm-imx-tpm.c writel(p->val, tpm->base + PWM_IMX_TPM_CnV(pwm->hwpwm)); pwm 242 drivers/pwm/pwm-imx-tpm.c || readl(tpm->base + PWM_IMX_TPM_CnV(pwm->hwpwm)) pwm 256 drivers/pwm/pwm-imx-tpm.c val = readl(tpm->base + PWM_IMX_TPM_CnSC(pwm->hwpwm)); pwm 272 drivers/pwm/pwm-imx-tpm.c writel(val, tpm->base + PWM_IMX_TPM_CnSC(pwm->hwpwm)); pwm 291 drivers/pwm/pwm-imx-tpm.c struct pwm_device *pwm, pwm 304 drivers/pwm/pwm-imx-tpm.c ret = pwm_imx_tpm_apply_hw(chip, ¶m, &real_state, pwm); pwm 310 drivers/pwm/pwm-imx-tpm.c static int pwm_imx_tpm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 321 drivers/pwm/pwm-imx-tpm.c static void pwm_imx_tpm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 64 drivers/pwm/pwm-imx1.c struct pwm_device *pwm, int duty_ns, int period_ns) pwm 94 drivers/pwm/pwm-imx1.c static int pwm_imx1_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 111 drivers/pwm/pwm-imx1.c static void pwm_imx1_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 119 drivers/pwm/pwm-imx27.c struct pwm_device *pwm, struct pwm_state *state) pwm 190 drivers/pwm/pwm-imx27.c struct pwm_device *pwm) pwm 201 drivers/pwm/pwm-imx27.c period_ms = DIV_ROUND_UP(pwm_get_period(pwm), pwm 211 drivers/pwm/pwm-imx27.c static int pwm_imx27_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 221 drivers/pwm/pwm-imx27.c pwm_get_state(pwm, &cstate); pwm 252 drivers/pwm/pwm-imx27.c pwm_imx27_wait_fifo_slot(chip, pwm); pwm 35 drivers/pwm/pwm-jz4740.c static int jz4740_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 41 drivers/pwm/pwm-jz4740.c if (pwm->hwpwm < 2) pwm 44 drivers/pwm/pwm-jz4740.c jz4740_timer_start(pwm->hwpwm); pwm 49 drivers/pwm/pwm-jz4740.c static void jz4740_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 51 drivers/pwm/pwm-jz4740.c jz4740_timer_set_ctrl(pwm->hwpwm, 0); pwm 53 drivers/pwm/pwm-jz4740.c jz4740_timer_stop(pwm->hwpwm); pwm 56 drivers/pwm/pwm-jz4740.c static int jz4740_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 58 drivers/pwm/pwm-jz4740.c uint32_t ctrl = jz4740_timer_get_ctrl(pwm->pwm); pwm 61 drivers/pwm/pwm-jz4740.c jz4740_timer_set_ctrl(pwm->hwpwm, ctrl); pwm 62 drivers/pwm/pwm-jz4740.c jz4740_timer_enable(pwm->hwpwm); pwm 67 drivers/pwm/pwm-jz4740.c static void jz4740_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 69 drivers/pwm/pwm-jz4740.c uint32_t ctrl = jz4740_timer_get_ctrl(pwm->hwpwm); pwm 75 drivers/pwm/pwm-jz4740.c jz4740_timer_set_duty(pwm->hwpwm, 0xffff); pwm 76 drivers/pwm/pwm-jz4740.c jz4740_timer_set_period(pwm->hwpwm, 0x0); pwm 84 drivers/pwm/pwm-jz4740.c jz4740_timer_set_ctrl(pwm->hwpwm, ctrl); pwm 87 drivers/pwm/pwm-jz4740.c jz4740_timer_disable(pwm->hwpwm); pwm 90 drivers/pwm/pwm-jz4740.c static int jz4740_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 93 drivers/pwm/pwm-jz4740.c struct jz4740_pwm_chip *jz4740 = to_jz4740(pwm->chip); pwm 118 drivers/pwm/pwm-jz4740.c jz4740_pwm_disable(chip, pwm); pwm 120 drivers/pwm/pwm-jz4740.c jz4740_timer_set_count(pwm->hwpwm, 0); pwm 121 drivers/pwm/pwm-jz4740.c jz4740_timer_set_duty(pwm->hwpwm, duty); pwm 122 drivers/pwm/pwm-jz4740.c jz4740_timer_set_period(pwm->hwpwm, period); pwm 127 drivers/pwm/pwm-jz4740.c jz4740_timer_set_ctrl(pwm->hwpwm, ctrl); pwm 138 drivers/pwm/pwm-jz4740.c jz4740_timer_set_ctrl(pwm->hwpwm, ctrl); pwm 141 drivers/pwm/pwm-jz4740.c jz4740_pwm_enable(chip, pwm); pwm 61 drivers/pwm/pwm-lp3943.c static int lp3943_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 66 drivers/pwm/pwm-lp3943.c pwm_map = lp3943_pwm_request_map(lp3943_pwm, pwm->hwpwm); pwm 70 drivers/pwm/pwm-lp3943.c return pwm_set_chip_data(pwm, pwm_map); pwm 87 drivers/pwm/pwm-lp3943.c static void lp3943_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 90 drivers/pwm/pwm-lp3943.c struct lp3943_pwm_map *pwm_map = pwm_get_chip_data(pwm); pwm 95 drivers/pwm/pwm-lp3943.c static int lp3943_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 113 drivers/pwm/pwm-lp3943.c if (pwm->hwpwm == 0) { pwm 153 drivers/pwm/pwm-lp3943.c static int lp3943_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 156 drivers/pwm/pwm-lp3943.c struct lp3943_pwm_map *pwm_map = pwm_get_chip_data(pwm); pwm 159 drivers/pwm/pwm-lp3943.c if (pwm->hwpwm == 0) pwm 172 drivers/pwm/pwm-lp3943.c static void lp3943_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 175 drivers/pwm/pwm-lp3943.c struct lp3943_pwm_map *pwm_map = pwm_get_chip_data(pwm); pwm 125 drivers/pwm/pwm-lpc18xx-sct.c struct pwm_device *pwm, pwm 138 drivers/pwm/pwm-lpc18xx-sct.c val &= ~LPC18XX_PWM_RES_MASK(pwm->hwpwm); pwm 139 drivers/pwm/pwm-lpc18xx-sct.c val |= LPC18XX_PWM_RES(pwm->hwpwm, action); pwm 163 drivers/pwm/pwm-lpc18xx-sct.c struct pwm_device *pwm, int duty_ns) pwm 166 drivers/pwm/pwm-lpc18xx-sct.c struct lpc18xx_pwm_data *lpc18xx_data = pwm_get_chip_data(pwm); pwm 181 drivers/pwm/pwm-lpc18xx-sct.c static int lpc18xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 206 drivers/pwm/pwm-lpc18xx-sct.c pwm->hwpwm); pwm 221 drivers/pwm/pwm-lpc18xx-sct.c lpc18xx_pwm_config_duty(chip, pwm, duty_ns); pwm 227 drivers/pwm/pwm-lpc18xx-sct.c struct pwm_device *pwm, pwm 233 drivers/pwm/pwm-lpc18xx-sct.c static int lpc18xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 236 drivers/pwm/pwm-lpc18xx-sct.c struct lpc18xx_pwm_data *lpc18xx_data = pwm_get_chip_data(pwm); pwm 249 drivers/pwm/pwm-lpc18xx-sct.c if (pwm_get_polarity(pwm) == PWM_POLARITY_NORMAL) { pwm 259 drivers/pwm/pwm-lpc18xx-sct.c lpc18xx_pwm_writel(lpc18xx_pwm, LPC18XX_PWM_OUTPUTSET(pwm->hwpwm), pwm 261 drivers/pwm/pwm-lpc18xx-sct.c lpc18xx_pwm_writel(lpc18xx_pwm, LPC18XX_PWM_OUTPUTCL(pwm->hwpwm), pwm 263 drivers/pwm/pwm-lpc18xx-sct.c lpc18xx_pwm_set_conflict_res(lpc18xx_pwm, pwm, res_action); pwm 268 drivers/pwm/pwm-lpc18xx-sct.c static void lpc18xx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 271 drivers/pwm/pwm-lpc18xx-sct.c struct lpc18xx_pwm_data *lpc18xx_data = pwm_get_chip_data(pwm); pwm 275 drivers/pwm/pwm-lpc18xx-sct.c lpc18xx_pwm_writel(lpc18xx_pwm, LPC18XX_PWM_OUTPUTSET(pwm->hwpwm), 0); pwm 276 drivers/pwm/pwm-lpc18xx-sct.c lpc18xx_pwm_writel(lpc18xx_pwm, LPC18XX_PWM_OUTPUTCL(pwm->hwpwm), 0); pwm 279 drivers/pwm/pwm-lpc18xx-sct.c static int lpc18xx_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 282 drivers/pwm/pwm-lpc18xx-sct.c struct lpc18xx_pwm_data *lpc18xx_data = pwm_get_chip_data(pwm); pwm 300 drivers/pwm/pwm-lpc18xx-sct.c static void lpc18xx_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 303 drivers/pwm/pwm-lpc18xx-sct.c struct lpc18xx_pwm_data *lpc18xx_data = pwm_get_chip_data(pwm); pwm 327 drivers/pwm/pwm-lpc18xx-sct.c struct pwm_device *pwm; pwm 412 drivers/pwm/pwm-lpc18xx-sct.c pwm = &lpc18xx_pwm->chip.pwms[i]; pwm 421 drivers/pwm/pwm-lpc18xx-sct.c pwm_set_chip_data(pwm, data); pwm 29 drivers/pwm/pwm-lpc32xx.c static int lpc32xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 54 drivers/pwm/pwm-lpc32xx.c val = readl(lpc32xx->base + (pwm->hwpwm << 2)); pwm 57 drivers/pwm/pwm-lpc32xx.c writel(val, lpc32xx->base + (pwm->hwpwm << 2)); pwm 62 drivers/pwm/pwm-lpc32xx.c static int lpc32xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 72 drivers/pwm/pwm-lpc32xx.c val = readl(lpc32xx->base + (pwm->hwpwm << 2)); pwm 74 drivers/pwm/pwm-lpc32xx.c writel(val, lpc32xx->base + (pwm->hwpwm << 2)); pwm 79 drivers/pwm/pwm-lpc32xx.c static void lpc32xx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 84 drivers/pwm/pwm-lpc32xx.c val = readl(lpc32xx->base + (pwm->hwpwm << 2)); pwm 86 drivers/pwm/pwm-lpc32xx.c writel(val, lpc32xx->base + (pwm->hwpwm << 2)); pwm 37 drivers/pwm/pwm-lpss.c static inline u32 pwm_lpss_read(const struct pwm_device *pwm) pwm 39 drivers/pwm/pwm-lpss.c struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); pwm 41 drivers/pwm/pwm-lpss.c return readl(lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM); pwm 44 drivers/pwm/pwm-lpss.c static inline void pwm_lpss_write(const struct pwm_device *pwm, u32 value) pwm 46 drivers/pwm/pwm-lpss.c struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); pwm 48 drivers/pwm/pwm-lpss.c writel(value, lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM); pwm 51 drivers/pwm/pwm-lpss.c static int pwm_lpss_wait_for_update(struct pwm_device *pwm) pwm 53 drivers/pwm/pwm-lpss.c struct pwm_lpss_chip *lpwm = to_lpwm(pwm->chip); pwm 54 drivers/pwm/pwm-lpss.c const void __iomem *addr = lpwm->regs + pwm->hwpwm * PWM_SIZE + PWM; pwm 72 drivers/pwm/pwm-lpss.c dev_err(pwm->chip->dev, "PWM_SW_UPDATE was not cleared\n"); pwm 77 drivers/pwm/pwm-lpss.c static inline int pwm_lpss_is_updating(struct pwm_device *pwm) pwm 79 drivers/pwm/pwm-lpss.c return (pwm_lpss_read(pwm) & PWM_SW_UPDATE) ? -EBUSY : 0; pwm 82 drivers/pwm/pwm-lpss.c static void pwm_lpss_prepare(struct pwm_lpss_chip *lpwm, struct pwm_device *pwm, pwm 105 drivers/pwm/pwm-lpss.c orig_ctrl = ctrl = pwm_lpss_read(pwm); pwm 113 drivers/pwm/pwm-lpss.c pwm_lpss_write(pwm, ctrl); pwm 114 drivers/pwm/pwm-lpss.c pwm_lpss_write(pwm, ctrl | PWM_SW_UPDATE); pwm 118 drivers/pwm/pwm-lpss.c static inline void pwm_lpss_cond_enable(struct pwm_device *pwm, bool cond) pwm 121 drivers/pwm/pwm-lpss.c pwm_lpss_write(pwm, pwm_lpss_read(pwm) | PWM_ENABLE); pwm 124 drivers/pwm/pwm-lpss.c static int pwm_lpss_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 131 drivers/pwm/pwm-lpss.c if (!pwm_is_enabled(pwm)) { pwm 133 drivers/pwm/pwm-lpss.c ret = pwm_lpss_is_updating(pwm); pwm 138 drivers/pwm/pwm-lpss.c pwm_lpss_prepare(lpwm, pwm, state->duty_cycle, state->period); pwm 139 drivers/pwm/pwm-lpss.c pwm_lpss_cond_enable(pwm, lpwm->info->bypass == false); pwm 140 drivers/pwm/pwm-lpss.c ret = pwm_lpss_wait_for_update(pwm); pwm 145 drivers/pwm/pwm-lpss.c pwm_lpss_cond_enable(pwm, lpwm->info->bypass == true); pwm 147 drivers/pwm/pwm-lpss.c ret = pwm_lpss_is_updating(pwm); pwm 150 drivers/pwm/pwm-lpss.c pwm_lpss_prepare(lpwm, pwm, state->duty_cycle, state->period); pwm 151 drivers/pwm/pwm-lpss.c return pwm_lpss_wait_for_update(pwm); pwm 153 drivers/pwm/pwm-lpss.c } else if (pwm_is_enabled(pwm)) { pwm 154 drivers/pwm/pwm-lpss.c pwm_lpss_write(pwm, pwm_lpss_read(pwm) & ~PWM_ENABLE); pwm 162 drivers/pwm/pwm-lpss.c static void pwm_lpss_get_state(struct pwm_chip *chip, struct pwm_device *pwm, pwm 172 drivers/pwm/pwm-lpss.c ctrl = pwm_lpss_read(pwm); pwm 70 drivers/pwm/pwm-mediatek.c struct pwm_device *pwm) pwm 83 drivers/pwm/pwm-mediatek.c ret = clk_prepare_enable(pc->clk_pwms[pwm->hwpwm]); pwm 98 drivers/pwm/pwm-mediatek.c struct pwm_device *pwm) pwm 102 drivers/pwm/pwm-mediatek.c clk_disable_unprepare(pc->clk_pwms[pwm->hwpwm]); pwm 120 drivers/pwm/pwm-mediatek.c static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 129 drivers/pwm/pwm-mediatek.c ret = pwm_mediatek_clk_enable(chip, pwm); pwm 136 drivers/pwm/pwm-mediatek.c do_div(resolution, clk_get_rate(pc->clk_pwms[pwm->hwpwm])); pwm 147 drivers/pwm/pwm-mediatek.c pwm_mediatek_clk_disable(chip, pwm); pwm 152 drivers/pwm/pwm-mediatek.c if (pc->soc->pwm45_fixup && pwm->hwpwm > 2) { pwm 162 drivers/pwm/pwm-mediatek.c pwm_mediatek_writel(pc, pwm->hwpwm, PWMCON, BIT(15) | clkdiv); pwm 163 drivers/pwm/pwm-mediatek.c pwm_mediatek_writel(pc, pwm->hwpwm, reg_width, cnt_period); pwm 164 drivers/pwm/pwm-mediatek.c pwm_mediatek_writel(pc, pwm->hwpwm, reg_thres, cnt_duty); pwm 166 drivers/pwm/pwm-mediatek.c pwm_mediatek_clk_disable(chip, pwm); pwm 171 drivers/pwm/pwm-mediatek.c static int pwm_mediatek_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 177 drivers/pwm/pwm-mediatek.c ret = pwm_mediatek_clk_enable(chip, pwm); pwm 182 drivers/pwm/pwm-mediatek.c value |= BIT(pwm->hwpwm); pwm 188 drivers/pwm/pwm-mediatek.c static void pwm_mediatek_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 194 drivers/pwm/pwm-mediatek.c value &= ~BIT(pwm->hwpwm); pwm 197 drivers/pwm/pwm-mediatek.c pwm_mediatek_clk_disable(chip, pwm); pwm 120 drivers/pwm/pwm-meson.c static int meson_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 127 drivers/pwm/pwm-meson.c channel = pwm_get_chip_data(pwm); pwm 131 drivers/pwm/pwm-meson.c channel = &meson->channels[pwm->hwpwm]; pwm 150 drivers/pwm/pwm-meson.c return pwm_set_chip_data(pwm, channel); pwm 153 drivers/pwm/pwm-meson.c static void meson_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 155 drivers/pwm/pwm-meson.c struct meson_pwm_channel *channel = pwm_get_chip_data(pwm); pwm 161 drivers/pwm/pwm-meson.c static int meson_pwm_calc(struct meson_pwm *meson, struct pwm_device *pwm, pwm 164 drivers/pwm/pwm-meson.c struct meson_pwm_channel *channel = pwm_get_chip_data(pwm); pwm 225 drivers/pwm/pwm-meson.c static void meson_pwm_enable(struct meson_pwm *meson, struct pwm_device *pwm) pwm 227 drivers/pwm/pwm-meson.c struct meson_pwm_channel *channel = pwm_get_chip_data(pwm); pwm 232 drivers/pwm/pwm-meson.c channel_data = &meson_pwm_per_channel_data[pwm->hwpwm]; pwm 253 drivers/pwm/pwm-meson.c static void meson_pwm_disable(struct meson_pwm *meson, struct pwm_device *pwm) pwm 261 drivers/pwm/pwm-meson.c value &= ~meson_pwm_per_channel_data[pwm->hwpwm].pwm_en_mask; pwm 267 drivers/pwm/pwm-meson.c static int meson_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 270 drivers/pwm/pwm-meson.c struct meson_pwm_channel *channel = pwm_get_chip_data(pwm); pwm 295 drivers/pwm/pwm-meson.c meson_pwm_enable(meson, pwm); pwm 297 drivers/pwm/pwm-meson.c meson_pwm_disable(meson, pwm); pwm 300 drivers/pwm/pwm-meson.c err = meson_pwm_calc(meson, pwm, state); pwm 304 drivers/pwm/pwm-meson.c meson_pwm_enable(meson, pwm); pwm 311 drivers/pwm/pwm-meson.c struct pwm_device *pwm, u32 cnt) pwm 319 drivers/pwm/pwm-meson.c channel = &meson->channels[pwm->hwpwm]; pwm 330 drivers/pwm/pwm-meson.c static void meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, pwm 341 drivers/pwm/pwm-meson.c channel = &meson->channels[pwm->hwpwm]; pwm 342 drivers/pwm/pwm-meson.c channel_data = &meson_pwm_per_channel_data[pwm->hwpwm]; pwm 358 drivers/pwm/pwm-meson.c state->period = meson_pwm_cnt_to_ns(chip, pwm, channel->hi); pwm 361 drivers/pwm/pwm-meson.c state->period = meson_pwm_cnt_to_ns(chip, pwm, pwm 363 drivers/pwm/pwm-meson.c state->duty_cycle = meson_pwm_cnt_to_ns(chip, pwm, pwm 69 drivers/pwm/pwm-mtk-disp.c static int mtk_disp_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 133 drivers/pwm/pwm-mtk-disp.c static int mtk_disp_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 154 drivers/pwm/pwm-mtk-disp.c static void mtk_disp_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 44 drivers/pwm/pwm-mxs.c static int mxs_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 74 drivers/pwm/pwm-mxs.c if (!pwm_is_enabled(pwm)) { pwm 81 drivers/pwm/pwm-mxs.c mxs->base + PWM_ACTIVE0 + pwm->hwpwm * 0x20); pwm 84 drivers/pwm/pwm-mxs.c mxs->base + PWM_PERIOD0 + pwm->hwpwm * 0x20); pwm 89 drivers/pwm/pwm-mxs.c if (!pwm_is_enabled(pwm)) pwm 95 drivers/pwm/pwm-mxs.c static int mxs_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 104 drivers/pwm/pwm-mxs.c writel(1 << pwm->hwpwm, mxs->base + PWM_CTRL + SET); pwm 109 drivers/pwm/pwm-mxs.c static void mxs_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 113 drivers/pwm/pwm-mxs.c writel(1 << pwm->hwpwm, mxs->base + PWM_CTRL + CLR); pwm 71 drivers/pwm/pwm-omap-dmtimer.c struct pwm_device *pwm) pwm 83 drivers/pwm/pwm-omap-dmtimer.c struct pwm_device *pwm) pwm 93 drivers/pwm/pwm-omap-dmtimer.c struct pwm_device *pwm, pwm 107 drivers/pwm/pwm-omap-dmtimer.c if (duty_ns == pwm_get_duty_cycle(pwm) && pwm 108 drivers/pwm/pwm-omap-dmtimer.c period_ns == pwm_get_period(pwm)) { pwm 193 drivers/pwm/pwm-omap-dmtimer.c pwm_get_polarity(pwm) == PWM_POLARITY_INVERSED, pwm 212 drivers/pwm/pwm-omap-dmtimer.c struct pwm_device *pwm, pwm 138 drivers/pwm/pwm-pca9685.c struct pwm_device *pwm = &pca->chip.pwms[offset]; pwm 141 drivers/pwm/pwm-pca9685.c regmap_read(pca->regmap, LED_N_ON_H(pwm->hwpwm), &value); pwm 150 drivers/pwm/pwm-pca9685.c struct pwm_device *pwm = &pca->chip.pwms[offset]; pwm 154 drivers/pwm/pwm-pca9685.c regmap_write(pca->regmap, LED_N_OFF_L(pwm->hwpwm), 0); pwm 155 drivers/pwm/pwm-pca9685.c regmap_write(pca->regmap, LED_N_OFF_H(pwm->hwpwm), 0); pwm 158 drivers/pwm/pwm-pca9685.c regmap_write(pca->regmap, LED_N_ON_H(pwm->hwpwm), on); pwm 246 drivers/pwm/pwm-pca9685.c static int pca9685_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 286 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 289 drivers/pwm/pwm-pca9685.c reg = LED_N_OFF_H(pwm->hwpwm); pwm 298 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 301 drivers/pwm/pwm-pca9685.c reg = LED_N_OFF_L(pwm->hwpwm); pwm 305 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 308 drivers/pwm/pwm-pca9685.c reg = LED_N_OFF_H(pwm->hwpwm); pwm 313 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 316 drivers/pwm/pwm-pca9685.c reg = LED_N_ON_H(pwm->hwpwm); pwm 326 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 329 drivers/pwm/pwm-pca9685.c reg = LED_N_OFF_L(pwm->hwpwm); pwm 333 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 336 drivers/pwm/pwm-pca9685.c reg = LED_N_OFF_H(pwm->hwpwm); pwm 341 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 344 drivers/pwm/pwm-pca9685.c reg = LED_N_ON_H(pwm->hwpwm); pwm 351 drivers/pwm/pwm-pca9685.c static int pca9685_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 360 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 363 drivers/pwm/pwm-pca9685.c reg = LED_N_ON_L(pwm->hwpwm); pwm 367 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 370 drivers/pwm/pwm-pca9685.c reg = LED_N_ON_H(pwm->hwpwm); pwm 378 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 381 drivers/pwm/pwm-pca9685.c reg = LED_N_OFF_H(pwm->hwpwm); pwm 388 drivers/pwm/pwm-pca9685.c static void pca9685_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 393 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 396 drivers/pwm/pwm-pca9685.c reg = LED_N_OFF_H(pwm->hwpwm); pwm 401 drivers/pwm/pwm-pca9685.c if (pwm->hwpwm >= PCA9685_MAXCHAN) pwm 404 drivers/pwm/pwm-pca9685.c reg = LED_N_OFF_L(pwm->hwpwm); pwm 409 drivers/pwm/pwm-pca9685.c static int pca9685_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 413 drivers/pwm/pwm-pca9685.c if (pca9685_pwm_test_and_set_inuse(pca, pwm->hwpwm)) pwm 420 drivers/pwm/pwm-pca9685.c static void pca9685_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 424 drivers/pwm/pwm-pca9685.c pca9685_pwm_disable(chip, pwm); pwm 426 drivers/pwm/pwm-pca9685.c pca9685_pwm_clear_inuse(pca, pwm->hwpwm); pwm 38 drivers/pwm/pwm-puv3.c static int puv3_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 79 drivers/pwm/pwm-puv3.c static int puv3_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 86 drivers/pwm/pwm-puv3.c static void puv3_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 60 drivers/pwm/pwm-pxa.c static int pxa_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 69 drivers/pwm/pwm-pxa.c offset = pwm->hwpwm ? 0x10 : 0; pwm 104 drivers/pwm/pwm-pxa.c static int pxa_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 111 drivers/pwm/pwm-pxa.c static void pxa_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 154 drivers/pwm/pwm-pxa.c struct pwm_device *pwm; pwm 156 drivers/pwm/pwm-pxa.c pwm = pwm_request_from_chip(pc, 0, NULL); pwm 157 drivers/pwm/pwm-pxa.c if (IS_ERR(pwm)) pwm 158 drivers/pwm/pwm-pxa.c return pwm; pwm 160 drivers/pwm/pwm-pxa.c pwm->args.period = args->args[0]; pwm 162 drivers/pwm/pwm-pxa.c return pwm; pwm 168 drivers/pwm/pwm-pxa.c struct pxa_pwm_chip *pwm; pwm 178 drivers/pwm/pwm-pxa.c pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); pwm 179 drivers/pwm/pwm-pxa.c if (pwm == NULL) pwm 182 drivers/pwm/pwm-pxa.c pwm->clk = devm_clk_get(&pdev->dev, NULL); pwm 183 drivers/pwm/pwm-pxa.c if (IS_ERR(pwm->clk)) pwm 184 drivers/pwm/pwm-pxa.c return PTR_ERR(pwm->clk); pwm 186 drivers/pwm/pwm-pxa.c pwm->chip.dev = &pdev->dev; pwm 187 drivers/pwm/pwm-pxa.c pwm->chip.ops = &pxa_pwm_ops; pwm 188 drivers/pwm/pwm-pxa.c pwm->chip.base = -1; pwm 189 drivers/pwm/pwm-pxa.c pwm->chip.npwm = (id->driver_data & HAS_SECONDARY_PWM) ? 2 : 1; pwm 192 drivers/pwm/pwm-pxa.c pwm->chip.of_xlate = pxa_pwm_of_xlate; pwm 193 drivers/pwm/pwm-pxa.c pwm->chip.of_pwm_n_cells = 1; pwm 197 drivers/pwm/pwm-pxa.c pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r); pwm 198 drivers/pwm/pwm-pxa.c if (IS_ERR(pwm->mmio_base)) pwm 199 drivers/pwm/pwm-pxa.c return PTR_ERR(pwm->mmio_base); pwm 201 drivers/pwm/pwm-pxa.c ret = pwmchip_add(&pwm->chip); pwm 207 drivers/pwm/pwm-pxa.c platform_set_drvdata(pdev, pwm); pwm 130 drivers/pwm/pwm-rcar.c static int rcar_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 135 drivers/pwm/pwm-rcar.c static void rcar_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 160 drivers/pwm/pwm-rcar.c static int rcar_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 168 drivers/pwm/pwm-rcar.c pwm_get_state(pwm, &cur_state); pwm 92 drivers/pwm/pwm-renesas-tpu.c static void tpu_pwm_write(struct tpu_pwm_device *pwm, int reg_nr, u16 value) pwm 94 drivers/pwm/pwm-renesas-tpu.c void __iomem *base = pwm->tpu->base + TPU_CHANNEL_OFFSET pwm 95 drivers/pwm/pwm-renesas-tpu.c + pwm->channel * TPU_CHANNEL_SIZE; pwm 100 drivers/pwm/pwm-renesas-tpu.c static void tpu_pwm_set_pin(struct tpu_pwm_device *pwm, pwm 105 drivers/pwm/pwm-renesas-tpu.c dev_dbg(&pwm->tpu->pdev->dev, "%u: configuring pin as %s\n", pwm 106 drivers/pwm/pwm-renesas-tpu.c pwm->channel, states[state]); pwm 110 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_write(pwm, TPU_TIORn, pwm 111 drivers/pwm/pwm-renesas-tpu.c pwm->polarity == PWM_POLARITY_INVERSED ? pwm 115 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_write(pwm, TPU_TIORn, pwm 116 drivers/pwm/pwm-renesas-tpu.c pwm->polarity == PWM_POLARITY_INVERSED ? pwm 120 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_write(pwm, TPU_TIORn, pwm 121 drivers/pwm/pwm-renesas-tpu.c pwm->polarity == PWM_POLARITY_INVERSED ? pwm 127 drivers/pwm/pwm-renesas-tpu.c static void tpu_pwm_start_stop(struct tpu_pwm_device *pwm, int start) pwm 132 drivers/pwm/pwm-renesas-tpu.c spin_lock_irqsave(&pwm->tpu->lock, flags); pwm 133 drivers/pwm/pwm-renesas-tpu.c value = ioread16(pwm->tpu->base + TPU_TSTR); pwm 136 drivers/pwm/pwm-renesas-tpu.c value |= 1 << pwm->channel; pwm 138 drivers/pwm/pwm-renesas-tpu.c value &= ~(1 << pwm->channel); pwm 140 drivers/pwm/pwm-renesas-tpu.c iowrite16(value, pwm->tpu->base + TPU_TSTR); pwm 141 drivers/pwm/pwm-renesas-tpu.c spin_unlock_irqrestore(&pwm->tpu->lock, flags); pwm 144 drivers/pwm/pwm-renesas-tpu.c static int tpu_pwm_timer_start(struct tpu_pwm_device *pwm) pwm 148 drivers/pwm/pwm-renesas-tpu.c if (!pwm->timer_on) { pwm 150 drivers/pwm/pwm-renesas-tpu.c pm_runtime_get_sync(&pwm->tpu->pdev->dev); pwm 151 drivers/pwm/pwm-renesas-tpu.c ret = clk_prepare_enable(pwm->tpu->clk); pwm 153 drivers/pwm/pwm-renesas-tpu.c dev_err(&pwm->tpu->pdev->dev, "cannot enable clock\n"); pwm 156 drivers/pwm/pwm-renesas-tpu.c pwm->timer_on = true; pwm 164 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_set_pin(pwm, TPU_PIN_INACTIVE); pwm 165 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_start_stop(pwm, false); pwm 175 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_write(pwm, TPU_TCRn, TPU_TCR_CCLR_TGRB | TPU_TCR_CKEG_RISING | pwm 176 drivers/pwm/pwm-renesas-tpu.c pwm->prescaler); pwm 177 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_write(pwm, TPU_TMDRn, TPU_TMDR_MD_PWM); pwm 178 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_set_pin(pwm, TPU_PIN_PWM); pwm 179 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_write(pwm, TPU_TGRAn, pwm->duty); pwm 180 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_write(pwm, TPU_TGRBn, pwm->period); pwm 182 drivers/pwm/pwm-renesas-tpu.c dev_dbg(&pwm->tpu->pdev->dev, "%u: TGRA 0x%04x TGRB 0x%04x\n", pwm 183 drivers/pwm/pwm-renesas-tpu.c pwm->channel, pwm->duty, pwm->period); pwm 186 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_start_stop(pwm, true); pwm 191 drivers/pwm/pwm-renesas-tpu.c static void tpu_pwm_timer_stop(struct tpu_pwm_device *pwm) pwm 193 drivers/pwm/pwm-renesas-tpu.c if (!pwm->timer_on) pwm 197 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_start_stop(pwm, false); pwm 200 drivers/pwm/pwm-renesas-tpu.c clk_disable_unprepare(pwm->tpu->clk); pwm 201 drivers/pwm/pwm-renesas-tpu.c pm_runtime_put(&pwm->tpu->pdev->dev); pwm 203 drivers/pwm/pwm-renesas-tpu.c pwm->timer_on = false; pwm 213 drivers/pwm/pwm-renesas-tpu.c struct tpu_pwm_device *pwm; pwm 218 drivers/pwm/pwm-renesas-tpu.c pwm = kzalloc(sizeof(*pwm), GFP_KERNEL); pwm 219 drivers/pwm/pwm-renesas-tpu.c if (pwm == NULL) pwm 222 drivers/pwm/pwm-renesas-tpu.c pwm->tpu = tpu; pwm 223 drivers/pwm/pwm-renesas-tpu.c pwm->channel = _pwm->hwpwm; pwm 224 drivers/pwm/pwm-renesas-tpu.c pwm->polarity = PWM_POLARITY_NORMAL; pwm 225 drivers/pwm/pwm-renesas-tpu.c pwm->prescaler = 0; pwm 226 drivers/pwm/pwm-renesas-tpu.c pwm->period = 0; pwm 227 drivers/pwm/pwm-renesas-tpu.c pwm->duty = 0; pwm 229 drivers/pwm/pwm-renesas-tpu.c pwm->timer_on = false; pwm 231 drivers/pwm/pwm-renesas-tpu.c pwm_set_chip_data(_pwm, pwm); pwm 238 drivers/pwm/pwm-renesas-tpu.c struct tpu_pwm_device *pwm = pwm_get_chip_data(_pwm); pwm 240 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_timer_stop(pwm); pwm 241 drivers/pwm/pwm-renesas-tpu.c kfree(pwm); pwm 248 drivers/pwm/pwm-renesas-tpu.c struct tpu_pwm_device *pwm = pwm_get_chip_data(_pwm); pwm 288 drivers/pwm/pwm-renesas-tpu.c if (pwm->prescaler == prescaler && pwm->period == period) pwm 291 drivers/pwm/pwm-renesas-tpu.c pwm->prescaler = prescaler; pwm 292 drivers/pwm/pwm-renesas-tpu.c pwm->period = period; pwm 293 drivers/pwm/pwm-renesas-tpu.c pwm->duty = duty; pwm 299 drivers/pwm/pwm-renesas-tpu.c if (duty_only && pwm->timer_on) { pwm 305 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_write(pwm, TPU_TGRAn, pwm->duty); pwm 306 drivers/pwm/pwm-renesas-tpu.c dev_dbg(&tpu->pdev->dev, "%u: TGRA 0x%04x\n", pwm->channel, pwm 307 drivers/pwm/pwm-renesas-tpu.c pwm->duty); pwm 310 drivers/pwm/pwm-renesas-tpu.c ret = tpu_pwm_timer_start(pwm); pwm 320 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_set_pin(pwm, duty ? TPU_PIN_ACTIVE : TPU_PIN_INACTIVE); pwm 321 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_timer_stop(pwm); pwm 330 drivers/pwm/pwm-renesas-tpu.c struct tpu_pwm_device *pwm = pwm_get_chip_data(_pwm); pwm 332 drivers/pwm/pwm-renesas-tpu.c pwm->polarity = polarity; pwm 339 drivers/pwm/pwm-renesas-tpu.c struct tpu_pwm_device *pwm = pwm_get_chip_data(_pwm); pwm 342 drivers/pwm/pwm-renesas-tpu.c ret = tpu_pwm_timer_start(pwm); pwm 350 drivers/pwm/pwm-renesas-tpu.c if (pwm->duty == 0 || pwm->duty == pwm->period) { pwm 351 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_set_pin(pwm, pwm->duty ? pwm 353 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_timer_stop(pwm); pwm 361 drivers/pwm/pwm-renesas-tpu.c struct tpu_pwm_device *pwm = pwm_get_chip_data(_pwm); pwm 364 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_timer_start(pwm); pwm 365 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_set_pin(pwm, TPU_PIN_INACTIVE); pwm 366 drivers/pwm/pwm-renesas-tpu.c tpu_pwm_timer_stop(pwm); pwm 61 drivers/pwm/pwm-rockchip.c struct pwm_device *pwm, pwm 101 drivers/pwm/pwm-rockchip.c static void rockchip_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 156 drivers/pwm/pwm-rockchip.c struct pwm_device *pwm, pwm 185 drivers/pwm/pwm-rockchip.c static int rockchip_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 197 drivers/pwm/pwm-rockchip.c pwm_get_state(pwm, &curstate); pwm 202 drivers/pwm/pwm-rockchip.c ret = rockchip_pwm_enable(chip, pwm, false); pwm 208 drivers/pwm/pwm-rockchip.c rockchip_pwm_config(chip, pwm, state); pwm 210 drivers/pwm/pwm-rockchip.c ret = rockchip_pwm_enable(chip, pwm, state->enabled); pwm 120 drivers/pwm/pwm-samsung.c static void pwm_samsung_set_divisor(struct samsung_pwm_chip *pwm, pwm 128 drivers/pwm/pwm-samsung.c bits = (fls(divisor) - 1) - pwm->variant.div_base; pwm 132 drivers/pwm/pwm-samsung.c reg = readl(pwm->base + REG_TCFG1); pwm 135 drivers/pwm/pwm-samsung.c writel(reg, pwm->base + REG_TCFG1); pwm 214 drivers/pwm/pwm-samsung.c static int pwm_samsung_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 219 drivers/pwm/pwm-samsung.c if (!(our_chip->variant.output_mask & BIT(pwm->hwpwm))) { pwm 222 drivers/pwm/pwm-samsung.c pwm->hwpwm); pwm 230 drivers/pwm/pwm-samsung.c pwm_set_chip_data(pwm, our_chan); pwm 235 drivers/pwm/pwm-samsung.c static void pwm_samsung_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 237 drivers/pwm/pwm-samsung.c kfree(pwm_get_chip_data(pwm)); pwm 240 drivers/pwm/pwm-samsung.c static int pwm_samsung_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 243 drivers/pwm/pwm-samsung.c unsigned int tcon_chan = to_tcon_channel(pwm->hwpwm); pwm 259 drivers/pwm/pwm-samsung.c our_chip->disabled_mask &= ~BIT(pwm->hwpwm); pwm 266 drivers/pwm/pwm-samsung.c static void pwm_samsung_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 269 drivers/pwm/pwm-samsung.c unsigned int tcon_chan = to_tcon_channel(pwm->hwpwm); pwm 279 drivers/pwm/pwm-samsung.c our_chip->disabled_mask |= BIT(pwm->hwpwm); pwm 285 drivers/pwm/pwm-samsung.c struct pwm_device *pwm) pwm 287 drivers/pwm/pwm-samsung.c unsigned int tcon_chan = to_tcon_channel(pwm->hwpwm); pwm 303 drivers/pwm/pwm-samsung.c static int __pwm_samsung_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 307 drivers/pwm/pwm-samsung.c struct samsung_pwm_channel *chan = pwm_get_chip_data(pwm); pwm 318 drivers/pwm/pwm-samsung.c tcnt = readl(our_chip->base + REG_TCNTB(pwm->hwpwm)); pwm 319 drivers/pwm/pwm-samsung.c oldtcmp = readl(our_chip->base + REG_TCMPB(pwm->hwpwm)); pwm 334 drivers/pwm/pwm-samsung.c tin_rate = pwm_samsung_calc_tin(our_chip, pwm->hwpwm, period); pwm 364 drivers/pwm/pwm-samsung.c writel(tcnt, our_chip->base + REG_TCNTB(pwm->hwpwm)); pwm 365 drivers/pwm/pwm-samsung.c writel(tcmp, our_chip->base + REG_TCMPB(pwm->hwpwm)); pwm 374 drivers/pwm/pwm-samsung.c pwm_samsung_manual_update(our_chip, pwm); pwm 384 drivers/pwm/pwm-samsung.c static int pwm_samsung_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 387 drivers/pwm/pwm-samsung.c return __pwm_samsung_config(chip, pwm, duty_ns, period_ns, false); pwm 415 drivers/pwm/pwm-samsung.c struct pwm_device *pwm, pwm 422 drivers/pwm/pwm-samsung.c pwm_samsung_set_invert(our_chip, pwm->hwpwm, invert); pwm 608 drivers/pwm/pwm-samsung.c struct pwm_device *pwm = &chip->pwms[i]; pwm 609 drivers/pwm/pwm-samsung.c struct samsung_pwm_channel *chan = pwm_get_chip_data(pwm); pwm 619 drivers/pwm/pwm-samsung.c __pwm_samsung_config(chip, pwm, chan->duty_ns, pwm 622 drivers/pwm/pwm-samsung.c pwm_samsung_manual_update(our_chip, pwm); pwm 626 drivers/pwm/pwm-samsung.c pwm_samsung_disable(chip, pwm); pwm 628 drivers/pwm/pwm-samsung.c pwm_samsung_enable(chip, pwm); pwm 61 drivers/pwm/pwm-sifive.c static int pwm_sifive_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 72 drivers/pwm/pwm-sifive.c static void pwm_sifive_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 109 drivers/pwm/pwm-sifive.c static void pwm_sifive_get_state(struct pwm_chip *chip, struct pwm_device *pwm, pwm 116 drivers/pwm/pwm-sifive.c pwm->hwpwm * PWM_SIFIVE_SIZE_PWMCMP); pwm 149 drivers/pwm/pwm-sifive.c static int pwm_sifive_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 170 drivers/pwm/pwm-sifive.c cur_state = pwm->state; pwm 198 drivers/pwm/pwm-sifive.c pwm->hwpwm * PWM_SIFIVE_SIZE_PWMCMP); pwm 300 drivers/pwm/pwm-sifive.c struct pwm_device *pwm; pwm 304 drivers/pwm/pwm-sifive.c pwm = &ddata->chip.pwms[ch]; pwm 305 drivers/pwm/pwm-sifive.c if (pwm->state.enabled) { pwm 77 drivers/pwm/pwm-spear.c static int spear_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 128 drivers/pwm/pwm-spear.c spear_pwm_writel(pc, pwm->hwpwm, PWMCR, pwm 130 drivers/pwm/pwm-spear.c spear_pwm_writel(pc, pwm->hwpwm, PWMDCR, dc); pwm 131 drivers/pwm/pwm-spear.c spear_pwm_writel(pc, pwm->hwpwm, PWMPCR, pv); pwm 137 drivers/pwm/pwm-spear.c static int spear_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 147 drivers/pwm/pwm-spear.c val = spear_pwm_readl(pc, pwm->hwpwm, PWMCR); pwm 149 drivers/pwm/pwm-spear.c spear_pwm_writel(pc, pwm->hwpwm, PWMCR, val); pwm 154 drivers/pwm/pwm-spear.c static void spear_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 159 drivers/pwm/pwm-spear.c val = spear_pwm_readl(pc, pwm->hwpwm, PWMCR); pwm 161 drivers/pwm/pwm-spear.c spear_pwm_writel(pc, pwm->hwpwm, PWMCR, val); pwm 68 drivers/pwm/pwm-sprd.c static void sprd_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, pwm 73 drivers/pwm/pwm-sprd.c struct sprd_pwm_chn *chn = &spc->chn[pwm->hwpwm]; pwm 85 drivers/pwm/pwm-sprd.c pwm->hwpwm); pwm 89 drivers/pwm/pwm-sprd.c val = sprd_pwm_read(spc, pwm->hwpwm, SPRD_PWM_ENABLE); pwm 103 drivers/pwm/pwm-sprd.c val = sprd_pwm_read(spc, pwm->hwpwm, SPRD_PWM_PRESCALE); pwm 108 drivers/pwm/pwm-sprd.c val = sprd_pwm_read(spc, pwm->hwpwm, SPRD_PWM_DUTY); pwm 118 drivers/pwm/pwm-sprd.c static int sprd_pwm_config(struct sprd_pwm_chip *spc, struct pwm_device *pwm, pwm 121 drivers/pwm/pwm-sprd.c struct sprd_pwm_chn *chn = &spc->chn[pwm->hwpwm]; pwm 151 drivers/pwm/pwm-sprd.c sprd_pwm_write(spc, pwm->hwpwm, SPRD_PWM_PRESCALE, prescale); pwm 152 drivers/pwm/pwm-sprd.c sprd_pwm_write(spc, pwm->hwpwm, SPRD_PWM_MOD, SPRD_PWM_MOD_MAX); pwm 153 drivers/pwm/pwm-sprd.c sprd_pwm_write(spc, pwm->hwpwm, SPRD_PWM_DUTY, duty); pwm 158 drivers/pwm/pwm-sprd.c static int sprd_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 163 drivers/pwm/pwm-sprd.c struct sprd_pwm_chn *chn = &spc->chn[pwm->hwpwm]; pwm 164 drivers/pwm/pwm-sprd.c struct pwm_state *cstate = &pwm->state; pwm 178 drivers/pwm/pwm-sprd.c pwm->hwpwm); pwm 185 drivers/pwm/pwm-sprd.c ret = sprd_pwm_config(spc, pwm, state->duty_cycle, pwm 191 drivers/pwm/pwm-sprd.c sprd_pwm_write(spc, pwm->hwpwm, SPRD_PWM_ENABLE, 1); pwm 198 drivers/pwm/pwm-sprd.c sprd_pwm_write(spc, pwm->hwpwm, SPRD_PWM_ENABLE, 0); pwm 163 drivers/pwm/pwm-sti.c static int sti_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 191 drivers/pwm/pwm-sti.c ((ncfg == 1) && (pwm->hwpwm == cur->hwpwm)) || pwm 192 drivers/pwm/pwm-sti.c ((ncfg == 1) && (pwm->hwpwm != cur->hwpwm) && period_same) || pwm 229 drivers/pwm/pwm-sti.c ret = regmap_write(pc->regmap, PWM_OUT_VAL(pwm->hwpwm), value); pwm 235 drivers/pwm/pwm-sti.c set_bit(pwm->hwpwm, &pc->configured); pwm 236 drivers/pwm/pwm-sti.c pc->cur = pwm; pwm 250 drivers/pwm/pwm-sti.c static int sti_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 274 drivers/pwm/pwm-sti.c pwm->hwpwm, ret); pwm 286 drivers/pwm/pwm-sti.c static void sti_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 305 drivers/pwm/pwm-sti.c static void sti_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 309 drivers/pwm/pwm-sti.c clear_bit(pwm->hwpwm, &pc->configured); pwm 312 drivers/pwm/pwm-sti.c static int sti_pwm_capture(struct pwm_chip *chip, struct pwm_device *pwm, pwm 317 drivers/pwm/pwm-sti.c struct sti_cpt_ddata *ddata = pwm_get_chip_data(pwm); pwm 323 drivers/pwm/pwm-sti.c if (pwm->hwpwm >= cdata->cpt_num_devs) { pwm 324 drivers/pwm/pwm-sti.c dev_err(dev, "device %u is not valid\n", pwm->hwpwm); pwm 332 drivers/pwm/pwm-sti.c regmap_write(pc->regmap, PWM_CPT_EDGE(pwm->hwpwm), CPT_EDGE_RISING); pwm 333 drivers/pwm/pwm-sti.c regmap_field_write(pc->pwm_cpt_int_en, BIT(pwm->hwpwm)); pwm 339 drivers/pwm/pwm-sti.c pwm->hwpwm, ret); pwm 346 drivers/pwm/pwm-sti.c regmap_write(pc->regmap, PWM_CPT_EDGE(pwm->hwpwm), CPT_EDGE_DISABLED); pwm 34 drivers/pwm/pwm-stm32-lp.c static int stm32_pwm_lp_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 44 drivers/pwm/pwm-stm32-lp.c pwm_get_state(pwm, &cstate); pwm 161 drivers/pwm/pwm-stm32-lp.c struct pwm_device *pwm, pwm 105 drivers/pwm/pwm-stm32.c static int stm32_pwm_raw_capture(struct stm32_pwm *priv, struct pwm_device *pwm, pwm 119 drivers/pwm/pwm-stm32.c dma_id = pwm->hwpwm < 2 ? STM32_TIMERS_DMA_CH1 : STM32_TIMERS_DMA_CH3; pwm 120 drivers/pwm/pwm-stm32.c ccen = pwm->hwpwm < 2 ? TIM_CCER_CC12E : TIM_CCER_CC34E; pwm 121 drivers/pwm/pwm-stm32.c ccr = pwm->hwpwm < 2 ? TIM_CCR1 : TIM_CCR3; pwm 142 drivers/pwm/pwm-stm32.c if (pwm->chip->npwm < 2) pwm 166 drivers/pwm/pwm-stm32.c static int stm32_pwm_capture(struct pwm_chip *chip, struct pwm_device *pwm, pwm 209 drivers/pwm/pwm-stm32.c pwm->hwpwm < 2 ? TIM_CCMR1 : TIM_CCMR2, pwm 210 drivers/pwm/pwm-stm32.c TIM_CCMR_CC1S | TIM_CCMR_CC2S, pwm->hwpwm & 0x1 ? pwm 215 drivers/pwm/pwm-stm32.c regmap_update_bits(priv->regmap, TIM_CCER, pwm->hwpwm < 2 ? pwm 216 drivers/pwm/pwm-stm32.c TIM_CCER_CC12P : TIM_CCER_CC34P, pwm->hwpwm < 2 ? pwm 219 drivers/pwm/pwm-stm32.c ret = stm32_pwm_raw_capture(priv, pwm, tmo_ms, &raw_prd, &raw_dty); pwm 240 drivers/pwm/pwm-stm32.c ret = stm32_pwm_raw_capture(priv, pwm, tmo_ms, &raw_prd, pwm 263 drivers/pwm/pwm-stm32.c pwm->hwpwm < 2 ? TIM_CCMR1 : TIM_CCMR2, pwm 268 drivers/pwm/pwm-stm32.c ret = stm32_pwm_raw_capture(priv, pwm, tmo_ms, &raw_prd, &raw_dty); pwm 309 drivers/pwm/pwm-stm32.c regmap_write(priv->regmap, pwm->hwpwm < 2 ? TIM_CCMR1 : TIM_CCMR2, 0); pwm 442 drivers/pwm/pwm-stm32.c static int stm32_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 449 drivers/pwm/pwm-stm32.c enabled = pwm->state.enabled; pwm 452 drivers/pwm/pwm-stm32.c stm32_pwm_disable(priv, pwm->hwpwm); pwm 456 drivers/pwm/pwm-stm32.c if (state->polarity != pwm->state.polarity) pwm 457 drivers/pwm/pwm-stm32.c stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity); pwm 459 drivers/pwm/pwm-stm32.c ret = stm32_pwm_config(priv, pwm->hwpwm, pwm 465 drivers/pwm/pwm-stm32.c ret = stm32_pwm_enable(priv, pwm->hwpwm); pwm 470 drivers/pwm/pwm-stm32.c static int stm32_pwm_apply_locked(struct pwm_chip *chip, struct pwm_device *pwm, pwm 478 drivers/pwm/pwm-stm32.c ret = stm32_pwm_apply(chip, pwm, state); pwm 39 drivers/pwm/pwm-stmpe.c static int stmpe_24xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 48 drivers/pwm/pwm-stmpe.c pwm->hwpwm); pwm 52 drivers/pwm/pwm-stmpe.c value = ret | BIT(pwm->hwpwm); pwm 57 drivers/pwm/pwm-stmpe.c pwm->hwpwm); pwm 65 drivers/pwm/pwm-stmpe.c struct pwm_device *pwm) pwm 74 drivers/pwm/pwm-stmpe.c pwm->hwpwm); pwm 78 drivers/pwm/pwm-stmpe.c value = ret & ~BIT(pwm->hwpwm); pwm 83 drivers/pwm/pwm-stmpe.c pwm->hwpwm); pwm 99 drivers/pwm/pwm-stmpe.c static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 113 drivers/pwm/pwm-stmpe.c if (pwm_is_enabled(pwm)) { pwm 114 drivers/pwm/pwm-stmpe.c stmpe_24xx_pwm_disable(chip, pwm); pwm 117 drivers/pwm/pwm-stmpe.c pin = pwm->hwpwm; pwm 128 drivers/pwm/pwm-stmpe.c pwm->hwpwm); pwm 134 drivers/pwm/pwm-stmpe.c switch (pwm->hwpwm) { pwm 153 drivers/pwm/pwm-stmpe.c pwm->hwpwm, duty_ns, period_ns); pwm 192 drivers/pwm/pwm-stmpe.c if (pwm_is_enabled(pwm)) pwm 193 drivers/pwm/pwm-stmpe.c stmpe_24xx_pwm_enable(chip, pwm); pwm 220 drivers/pwm/pwm-stmpe.c pwm->hwpwm, value, last, program[0], program[1], pwm 251 drivers/pwm/pwm-stmpe.c if (pwm_is_enabled(pwm)) pwm 252 drivers/pwm/pwm-stmpe.c stmpe_24xx_pwm_enable(chip, pwm); pwm 257 drivers/pwm/pwm-stmpe.c dev_dbg(chip->dev, "programmed PWM#%u, %u bytes\n", pwm->hwpwm, i); pwm 272 drivers/pwm/pwm-stmpe.c struct stmpe_pwm *pwm; pwm 275 drivers/pwm/pwm-stmpe.c pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); pwm 276 drivers/pwm/pwm-stmpe.c if (!pwm) pwm 279 drivers/pwm/pwm-stmpe.c pwm->stmpe = stmpe; pwm 280 drivers/pwm/pwm-stmpe.c pwm->chip.dev = &pdev->dev; pwm 281 drivers/pwm/pwm-stmpe.c pwm->chip.base = -1; pwm 284 drivers/pwm/pwm-stmpe.c pwm->chip.ops = &stmpe_24xx_pwm_ops; pwm 285 drivers/pwm/pwm-stmpe.c pwm->chip.npwm = 3; pwm 299 drivers/pwm/pwm-stmpe.c ret = pwmchip_add(&pwm->chip); pwm 305 drivers/pwm/pwm-stmpe.c platform_set_drvdata(pdev, pwm); pwm 106 drivers/pwm/pwm-sun4i.c struct pwm_device *pwm, pwm 118 drivers/pwm/pwm-sun4i.c if ((PWM_REG_PRESCAL(val, pwm->hwpwm) == PWM_PRESCAL_MASK) && pwm 122 drivers/pwm/pwm-sun4i.c prescaler = prescaler_table[PWM_REG_PRESCAL(val, pwm->hwpwm)]; pwm 127 drivers/pwm/pwm-sun4i.c if (val & BIT_CH(PWM_ACT_STATE, pwm->hwpwm)) pwm 132 drivers/pwm/pwm-sun4i.c if ((val & BIT_CH(PWM_CLK_GATING | PWM_EN, pwm->hwpwm)) == pwm 133 drivers/pwm/pwm-sun4i.c BIT_CH(PWM_CLK_GATING | PWM_EN, pwm->hwpwm)) pwm 138 drivers/pwm/pwm-sun4i.c val = sun4i_pwm_readl(sun4i_pwm, PWM_CH_PRD(pwm->hwpwm)); pwm 198 drivers/pwm/pwm-sun4i.c static int sun4i_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 208 drivers/pwm/pwm-sun4i.c pwm_get_state(pwm, &cstate); pwm 236 drivers/pwm/pwm-sun4i.c if (PWM_REG_PRESCAL(ctrl, pwm->hwpwm) != prescaler) { pwm 238 drivers/pwm/pwm-sun4i.c ctrl &= ~BIT_CH(PWM_CLK_GATING, pwm->hwpwm); pwm 241 drivers/pwm/pwm-sun4i.c ctrl &= ~BIT_CH(PWM_PRESCAL_MASK, pwm->hwpwm); pwm 242 drivers/pwm/pwm-sun4i.c ctrl |= BIT_CH(prescaler, pwm->hwpwm); pwm 246 drivers/pwm/pwm-sun4i.c sun4i_pwm_writel(sun4i_pwm, val, PWM_CH_PRD(pwm->hwpwm)); pwm 247 drivers/pwm/pwm-sun4i.c sun4i_pwm->next_period[pwm->hwpwm] = jiffies + pwm 249 drivers/pwm/pwm-sun4i.c sun4i_pwm->needs_delay[pwm->hwpwm] = true; pwm 253 drivers/pwm/pwm-sun4i.c ctrl &= ~BIT_CH(PWM_ACT_STATE, pwm->hwpwm); pwm 255 drivers/pwm/pwm-sun4i.c ctrl |= BIT_CH(PWM_ACT_STATE, pwm->hwpwm); pwm 257 drivers/pwm/pwm-sun4i.c ctrl |= BIT_CH(PWM_CLK_GATING, pwm->hwpwm); pwm 259 drivers/pwm/pwm-sun4i.c ctrl |= BIT_CH(PWM_EN, pwm->hwpwm); pwm 260 drivers/pwm/pwm-sun4i.c } else if (!sun4i_pwm->needs_delay[pwm->hwpwm]) { pwm 261 drivers/pwm/pwm-sun4i.c ctrl &= ~BIT_CH(PWM_EN, pwm->hwpwm); pwm 262 drivers/pwm/pwm-sun4i.c ctrl &= ~BIT_CH(PWM_CLK_GATING, pwm->hwpwm); pwm 272 drivers/pwm/pwm-sun4i.c if (!sun4i_pwm->needs_delay[pwm->hwpwm]) { pwm 279 drivers/pwm/pwm-sun4i.c if (sun4i_pwm->needs_delay[pwm->hwpwm] && pwm 280 drivers/pwm/pwm-sun4i.c time_before(now, sun4i_pwm->next_period[pwm->hwpwm])) { pwm 281 drivers/pwm/pwm-sun4i.c delay_us = jiffies_to_usecs(sun4i_pwm->next_period[pwm->hwpwm] - pwm 288 drivers/pwm/pwm-sun4i.c sun4i_pwm->needs_delay[pwm->hwpwm] = false; pwm 292 drivers/pwm/pwm-sun4i.c ctrl &= ~BIT_CH(PWM_CLK_GATING, pwm->hwpwm); pwm 293 drivers/pwm/pwm-sun4i.c ctrl &= ~BIT_CH(PWM_EN, pwm->hwpwm); pwm 347 drivers/pwm/pwm-sun4i.c struct sun4i_pwm_chip *pwm; pwm 351 drivers/pwm/pwm-sun4i.c pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); pwm 352 drivers/pwm/pwm-sun4i.c if (!pwm) pwm 355 drivers/pwm/pwm-sun4i.c pwm->data = of_device_get_match_data(&pdev->dev); pwm 356 drivers/pwm/pwm-sun4i.c if (!pwm->data) pwm 360 drivers/pwm/pwm-sun4i.c pwm->base = devm_ioremap_resource(&pdev->dev, res); pwm 361 drivers/pwm/pwm-sun4i.c if (IS_ERR(pwm->base)) pwm 362 drivers/pwm/pwm-sun4i.c return PTR_ERR(pwm->base); pwm 364 drivers/pwm/pwm-sun4i.c pwm->clk = devm_clk_get(&pdev->dev, NULL); pwm 365 drivers/pwm/pwm-sun4i.c if (IS_ERR(pwm->clk)) pwm 366 drivers/pwm/pwm-sun4i.c return PTR_ERR(pwm->clk); pwm 368 drivers/pwm/pwm-sun4i.c pwm->chip.dev = &pdev->dev; pwm 369 drivers/pwm/pwm-sun4i.c pwm->chip.ops = &sun4i_pwm_ops; pwm 370 drivers/pwm/pwm-sun4i.c pwm->chip.base = -1; pwm 371 drivers/pwm/pwm-sun4i.c pwm->chip.npwm = pwm->data->npwm; pwm 372 drivers/pwm/pwm-sun4i.c pwm->chip.of_xlate = of_pwm_xlate_with_flags; pwm 373 drivers/pwm/pwm-sun4i.c pwm->chip.of_pwm_n_cells = 3; pwm 375 drivers/pwm/pwm-sun4i.c spin_lock_init(&pwm->ctrl_lock); pwm 377 drivers/pwm/pwm-sun4i.c ret = pwmchip_add(&pwm->chip); pwm 383 drivers/pwm/pwm-sun4i.c platform_set_drvdata(pdev, pwm); pwm 390 drivers/pwm/pwm-sun4i.c struct sun4i_pwm_chip *pwm = platform_get_drvdata(pdev); pwm 392 drivers/pwm/pwm-sun4i.c return pwmchip_remove(&pwm->chip); pwm 66 drivers/pwm/pwm-tegra.c static int tegra_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 116 drivers/pwm/pwm-tegra.c if (!pwm_is_enabled(pwm)) { pwm 123 drivers/pwm/pwm-tegra.c pwm_writel(pc, pwm->hwpwm, val); pwm 128 drivers/pwm/pwm-tegra.c if (!pwm_is_enabled(pwm)) pwm 134 drivers/pwm/pwm-tegra.c static int tegra_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 144 drivers/pwm/pwm-tegra.c val = pwm_readl(pc, pwm->hwpwm); pwm 146 drivers/pwm/pwm-tegra.c pwm_writel(pc, pwm->hwpwm, val); pwm 151 drivers/pwm/pwm-tegra.c static void tegra_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 156 drivers/pwm/pwm-tegra.c val = pwm_readl(pc, pwm->hwpwm); pwm 158 drivers/pwm/pwm-tegra.c pwm_writel(pc, pwm->hwpwm, val); pwm 172 drivers/pwm/pwm-tegra.c struct tegra_pwm_chip *pwm; pwm 176 drivers/pwm/pwm-tegra.c pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); pwm 177 drivers/pwm/pwm-tegra.c if (!pwm) pwm 180 drivers/pwm/pwm-tegra.c pwm->soc = of_device_get_match_data(&pdev->dev); pwm 181 drivers/pwm/pwm-tegra.c pwm->dev = &pdev->dev; pwm 184 drivers/pwm/pwm-tegra.c pwm->regs = devm_ioremap_resource(&pdev->dev, r); pwm 185 drivers/pwm/pwm-tegra.c if (IS_ERR(pwm->regs)) pwm 186 drivers/pwm/pwm-tegra.c return PTR_ERR(pwm->regs); pwm 188 drivers/pwm/pwm-tegra.c platform_set_drvdata(pdev, pwm); pwm 190 drivers/pwm/pwm-tegra.c pwm->clk = devm_clk_get(&pdev->dev, NULL); pwm 191 drivers/pwm/pwm-tegra.c if (IS_ERR(pwm->clk)) pwm 192 drivers/pwm/pwm-tegra.c return PTR_ERR(pwm->clk); pwm 195 drivers/pwm/pwm-tegra.c ret = clk_set_rate(pwm->clk, pwm->soc->max_frequency); pwm 206 drivers/pwm/pwm-tegra.c pwm->clk_rate = clk_get_rate(pwm->clk); pwm 208 drivers/pwm/pwm-tegra.c pwm->rst = devm_reset_control_get_exclusive(&pdev->dev, "pwm"); pwm 209 drivers/pwm/pwm-tegra.c if (IS_ERR(pwm->rst)) { pwm 210 drivers/pwm/pwm-tegra.c ret = PTR_ERR(pwm->rst); pwm 215 drivers/pwm/pwm-tegra.c reset_control_deassert(pwm->rst); pwm 217 drivers/pwm/pwm-tegra.c pwm->chip.dev = &pdev->dev; pwm 218 drivers/pwm/pwm-tegra.c pwm->chip.ops = &tegra_pwm_ops; pwm 219 drivers/pwm/pwm-tegra.c pwm->chip.base = -1; pwm 220 drivers/pwm/pwm-tegra.c pwm->chip.npwm = pwm->soc->num_channels; pwm 222 drivers/pwm/pwm-tegra.c ret = pwmchip_add(&pwm->chip); pwm 225 drivers/pwm/pwm-tegra.c reset_control_assert(pwm->rst); pwm 246 drivers/pwm/pwm-tegra.c struct pwm_device *pwm = &pc->chip.pwms[i]; pwm 248 drivers/pwm/pwm-tegra.c if (!pwm_is_enabled(pwm)) pwm 50 drivers/pwm/pwm-tiecap.c static int ecap_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 85 drivers/pwm/pwm-tiecap.c if (!pwm_is_enabled(pwm)) { pwm 99 drivers/pwm/pwm-tiecap.c if (!pwm_is_enabled(pwm)) { pwm 111 drivers/pwm/pwm-tiecap.c static int ecap_pwm_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm, pwm 135 drivers/pwm/pwm-tiecap.c static int ecap_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 154 drivers/pwm/pwm-tiecap.c static void ecap_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 171 drivers/pwm/pwm-tiecap.c static void ecap_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 173 drivers/pwm/pwm-tiecap.c if (pwm_is_enabled(pwm)) { pwm 279 drivers/pwm/pwm-tiecap.c struct pwm_device *pwm = pc->chip.pwms; pwm 284 drivers/pwm/pwm-tiecap.c if (pwm_is_enabled(pwm)) pwm 293 drivers/pwm/pwm-tiecap.c struct pwm_device *pwm = pc->chip.pwms; pwm 296 drivers/pwm/pwm-tiecap.c if (pwm_is_enabled(pwm)) pwm 218 drivers/pwm/pwm-tiehrpwm.c static int ehrpwm_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 256 drivers/pwm/pwm-tiehrpwm.c if (i == pwm->hwpwm) pwm 266 drivers/pwm/pwm-tiehrpwm.c pc->period_cycles[pwm->hwpwm] = period_cycles; pwm 293 drivers/pwm/pwm-tiehrpwm.c if (pwm->hwpwm == 1) pwm 308 drivers/pwm/pwm-tiehrpwm.c struct pwm_device *pwm, pwm 314 drivers/pwm/pwm-tiehrpwm.c pc->polarity[pwm->hwpwm] = polarity; pwm 319 drivers/pwm/pwm-tiehrpwm.c static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 329 drivers/pwm/pwm-tiehrpwm.c if (pwm->hwpwm) { pwm 344 drivers/pwm/pwm-tiehrpwm.c configure_polarity(pc, pwm->hwpwm); pwm 357 drivers/pwm/pwm-tiehrpwm.c static void ehrpwm_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 363 drivers/pwm/pwm-tiehrpwm.c if (pwm->hwpwm) { pwm 391 drivers/pwm/pwm-tiehrpwm.c static void ehrpwm_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 395 drivers/pwm/pwm-tiehrpwm.c if (pwm_is_enabled(pwm)) { pwm 401 drivers/pwm/pwm-tiehrpwm.c pc->period_cycles[pwm->hwpwm] = 0; pwm 541 drivers/pwm/pwm-tiehrpwm.c struct pwm_device *pwm = &pc->chip.pwms[i]; pwm 543 drivers/pwm/pwm-tiehrpwm.c if (!pwm_is_enabled(pwm)) pwm 559 drivers/pwm/pwm-tiehrpwm.c struct pwm_device *pwm = &pc->chip.pwms[i]; pwm 561 drivers/pwm/pwm-tiehrpwm.c if (!pwm_is_enabled(pwm)) pwm 58 drivers/pwm/pwm-twl-led.c static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 81 drivers/pwm/pwm-twl-led.c base = pwm->hwpwm * 2 + TWL4030_PWMA_REG; pwm 87 drivers/pwm/pwm-twl-led.c dev_err(chip->dev, "%s: Failed to configure PWM\n", pwm->label); pwm 92 drivers/pwm/pwm-twl-led.c static int twl4030_pwmled_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 101 drivers/pwm/pwm-twl-led.c dev_err(chip->dev, "%s: Failed to read LEDEN\n", pwm->label); pwm 105 drivers/pwm/pwm-twl-led.c val |= TWL4030_LED_TOGGLE(pwm->hwpwm, TWL4030_LED_PINS); pwm 109 drivers/pwm/pwm-twl-led.c dev_err(chip->dev, "%s: Failed to enable PWM\n", pwm->label); pwm 117 drivers/pwm/pwm-twl-led.c struct pwm_device *pwm) pwm 126 drivers/pwm/pwm-twl-led.c dev_err(chip->dev, "%s: Failed to read LEDEN\n", pwm->label); pwm 130 drivers/pwm/pwm-twl-led.c val &= ~TWL4030_LED_TOGGLE(pwm->hwpwm, TWL4030_LED_PINS); pwm 134 drivers/pwm/pwm-twl-led.c dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label); pwm 140 drivers/pwm/pwm-twl-led.c static int twl6030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 152 drivers/pwm/pwm-twl-led.c dev_err(chip->dev, "%s: Failed to configure PWM\n", pwm->label); pwm 157 drivers/pwm/pwm-twl-led.c static int twl6030_pwmled_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 167 drivers/pwm/pwm-twl-led.c pwm->label); pwm 176 drivers/pwm/pwm-twl-led.c dev_err(chip->dev, "%s: Failed to enable PWM\n", pwm->label); pwm 184 drivers/pwm/pwm-twl-led.c struct pwm_device *pwm) pwm 194 drivers/pwm/pwm-twl-led.c pwm->label); pwm 203 drivers/pwm/pwm-twl-led.c dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label); pwm 209 drivers/pwm/pwm-twl-led.c static int twl6030_pwmled_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 219 drivers/pwm/pwm-twl-led.c pwm->label); pwm 228 drivers/pwm/pwm-twl-led.c dev_err(chip->dev, "%s: Failed to request PWM\n", pwm->label); pwm 235 drivers/pwm/pwm-twl-led.c static void twl6030_pwmled_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 245 drivers/pwm/pwm-twl-led.c pwm->label); pwm 254 drivers/pwm/pwm-twl-led.c dev_err(chip->dev, "%s: Failed to free PWM\n", pwm->label); pwm 32 drivers/pwm/pwm-twl.c #define TWL4030_PWM_TOGGLE(pwm, x) ((x) << (pwm)) pwm 46 drivers/pwm/pwm-twl.c #define TWL6030_PWM_TOGGLE(pwm, x) ((x) << (pwm * 3)) pwm 60 drivers/pwm/pwm-twl.c static int twl_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 83 drivers/pwm/pwm-twl.c base = pwm->hwpwm * 3; pwm 89 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to configure PWM\n", pwm->label); pwm 94 drivers/pwm/pwm-twl.c static int twl4030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 103 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to read GPBR1\n", pwm->label); pwm 107 drivers/pwm/pwm-twl.c val |= TWL4030_PWM_TOGGLE(pwm->hwpwm, TWL4030_PWMXCLK_ENABLE); pwm 111 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to enable PWM\n", pwm->label); pwm 113 drivers/pwm/pwm-twl.c val |= TWL4030_PWM_TOGGLE(pwm->hwpwm, TWL4030_PWMX_ENABLE); pwm 117 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to enable PWM\n", pwm->label); pwm 124 drivers/pwm/pwm-twl.c static void twl4030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 133 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to read GPBR1\n", pwm->label); pwm 137 drivers/pwm/pwm-twl.c val &= ~TWL4030_PWM_TOGGLE(pwm->hwpwm, TWL4030_PWMX_ENABLE); pwm 141 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label); pwm 143 drivers/pwm/pwm-twl.c val &= ~TWL4030_PWM_TOGGLE(pwm->hwpwm, TWL4030_PWMXCLK_ENABLE); pwm 147 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label); pwm 153 drivers/pwm/pwm-twl.c static int twl4030_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 159 drivers/pwm/pwm-twl.c if (pwm->hwpwm == 1) { pwm 170 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to read PMBR1\n", pwm->label); pwm 184 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to request PWM\n", pwm->label); pwm 191 drivers/pwm/pwm-twl.c static void twl4030_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 197 drivers/pwm/pwm-twl.c if (pwm->hwpwm == 1) pwm 205 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to read PMBR1\n", pwm->label); pwm 215 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to free PWM\n", pwm->label); pwm 221 drivers/pwm/pwm-twl.c static int twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 229 drivers/pwm/pwm-twl.c val |= TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXS | TWL6030_PWMXEN); pwm 230 drivers/pwm/pwm-twl.c val &= ~TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXR); pwm 234 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to enable PWM\n", pwm->label); pwm 244 drivers/pwm/pwm-twl.c static void twl6030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 252 drivers/pwm/pwm-twl.c val |= TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXR); pwm 253 drivers/pwm/pwm-twl.c val &= ~TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXS | TWL6030_PWMXEN); pwm 257 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label); pwm 261 drivers/pwm/pwm-twl.c val |= TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXEN); pwm 265 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label); pwm 269 drivers/pwm/pwm-twl.c val &= ~TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXEN); pwm 273 drivers/pwm/pwm-twl.c dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label); pwm 31 drivers/pwm/pwm-vt8500.c #define REG_CTRL(pwm) (((pwm) << 4) + 0x00) pwm 32 drivers/pwm/pwm-vt8500.c #define REG_SCALAR(pwm) (((pwm) << 4) + 0x04) pwm 33 drivers/pwm/pwm-vt8500.c #define REG_PERIOD(pwm) (((pwm) << 4) + 0x08) pwm 34 drivers/pwm/pwm-vt8500.c #define REG_DUTY(pwm) (((pwm) << 4) + 0x0C) pwm 72 drivers/pwm/pwm-vt8500.c static int vt8500_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 108 drivers/pwm/pwm-vt8500.c writel(prescale, vt8500->base + REG_SCALAR(pwm->hwpwm)); pwm 109 drivers/pwm/pwm-vt8500.c pwm_busy_wait(vt8500, pwm->hwpwm, STATUS_SCALAR_UPDATE); pwm 111 drivers/pwm/pwm-vt8500.c writel(pv, vt8500->base + REG_PERIOD(pwm->hwpwm)); pwm 112 drivers/pwm/pwm-vt8500.c pwm_busy_wait(vt8500, pwm->hwpwm, STATUS_PERIOD_UPDATE); pwm 114 drivers/pwm/pwm-vt8500.c writel(dc, vt8500->base + REG_DUTY(pwm->hwpwm)); pwm 115 drivers/pwm/pwm-vt8500.c pwm_busy_wait(vt8500, pwm->hwpwm, STATUS_DUTY_UPDATE); pwm 117 drivers/pwm/pwm-vt8500.c val = readl(vt8500->base + REG_CTRL(pwm->hwpwm)); pwm 119 drivers/pwm/pwm-vt8500.c writel(val, vt8500->base + REG_CTRL(pwm->hwpwm)); pwm 120 drivers/pwm/pwm-vt8500.c pwm_busy_wait(vt8500, pwm->hwpwm, STATUS_CTRL_UPDATE); pwm 126 drivers/pwm/pwm-vt8500.c static int vt8500_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 138 drivers/pwm/pwm-vt8500.c val = readl(vt8500->base + REG_CTRL(pwm->hwpwm)); pwm 140 drivers/pwm/pwm-vt8500.c writel(val, vt8500->base + REG_CTRL(pwm->hwpwm)); pwm 141 drivers/pwm/pwm-vt8500.c pwm_busy_wait(vt8500, pwm->hwpwm, STATUS_CTRL_UPDATE); pwm 146 drivers/pwm/pwm-vt8500.c static void vt8500_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 151 drivers/pwm/pwm-vt8500.c val = readl(vt8500->base + REG_CTRL(pwm->hwpwm)); pwm 153 drivers/pwm/pwm-vt8500.c writel(val, vt8500->base + REG_CTRL(pwm->hwpwm)); pwm 154 drivers/pwm/pwm-vt8500.c pwm_busy_wait(vt8500, pwm->hwpwm, STATUS_CTRL_UPDATE); pwm 160 drivers/pwm/pwm-vt8500.c struct pwm_device *pwm, pwm 166 drivers/pwm/pwm-vt8500.c val = readl(vt8500->base + REG_CTRL(pwm->hwpwm)); pwm 173 drivers/pwm/pwm-vt8500.c writel(val, vt8500->base + REG_CTRL(pwm->hwpwm)); pwm 174 drivers/pwm/pwm-vt8500.c pwm_busy_wait(vt8500, pwm->hwpwm, STATUS_CTRL_UPDATE); pwm 64 drivers/pwm/pwm-zx.c static void zx_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, pwm 73 drivers/pwm/pwm-zx.c value = zx_pwm_readl(zpc, pwm->hwpwm, ZX_PWM_MODE); pwm 88 drivers/pwm/pwm-zx.c tmp = zx_pwm_readl(zpc, pwm->hwpwm, ZX_PWM_PERIOD); pwm 92 drivers/pwm/pwm-zx.c tmp = zx_pwm_readl(zpc, pwm->hwpwm, ZX_PWM_DUTY); pwm 97 drivers/pwm/pwm-zx.c static int zx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 133 drivers/pwm/pwm-zx.c if (pwm_is_enabled(pwm)) pwm 134 drivers/pwm/pwm-zx.c zx_pwm_set_mask(zpc, pwm->hwpwm, ZX_PWM_MODE, ZX_PWM_EN, 0); pwm 137 drivers/pwm/pwm-zx.c zx_pwm_set_mask(zpc, pwm->hwpwm, ZX_PWM_MODE, ZX_PWM_CLKDIV_MASK, pwm 139 drivers/pwm/pwm-zx.c zx_pwm_writel(zpc, pwm->hwpwm, ZX_PWM_PERIOD, period_cycles); pwm 140 drivers/pwm/pwm-zx.c zx_pwm_writel(zpc, pwm->hwpwm, ZX_PWM_DUTY, duty_cycles); pwm 143 drivers/pwm/pwm-zx.c if (pwm_is_enabled(pwm)) pwm 144 drivers/pwm/pwm-zx.c zx_pwm_set_mask(zpc, pwm->hwpwm, ZX_PWM_MODE, pwm 150 drivers/pwm/pwm-zx.c static int zx_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, pwm 157 drivers/pwm/pwm-zx.c pwm_get_state(pwm, &cstate); pwm 160 drivers/pwm/pwm-zx.c zx_pwm_set_mask(zpc, pwm->hwpwm, ZX_PWM_MODE, ZX_PWM_POLAR, pwm 166 drivers/pwm/pwm-zx.c ret = zx_pwm_config(chip, pwm, state->duty_cycle, pwm 178 drivers/pwm/pwm-zx.c zx_pwm_set_mask(zpc, pwm->hwpwm, ZX_PWM_MODE, pwm 181 drivers/pwm/pwm-zx.c zx_pwm_set_mask(zpc, pwm->hwpwm, ZX_PWM_MODE, pwm 19 drivers/pwm/sysfs.c struct pwm_device *pwm; pwm 33 drivers/pwm/sysfs.c return export->pwm; pwm 40 drivers/pwm/sysfs.c const struct pwm_device *pwm = child_to_pwm_device(child); pwm 43 drivers/pwm/sysfs.c pwm_get_state(pwm, &state); pwm 53 drivers/pwm/sysfs.c struct pwm_device *pwm = export->pwm; pwm 63 drivers/pwm/sysfs.c pwm_get_state(pwm, &state); pwm 65 drivers/pwm/sysfs.c ret = pwm_apply_state(pwm, &state); pwm 75 drivers/pwm/sysfs.c const struct pwm_device *pwm = child_to_pwm_device(child); pwm 78 drivers/pwm/sysfs.c pwm_get_state(pwm, &state); pwm 88 drivers/pwm/sysfs.c struct pwm_device *pwm = export->pwm; pwm 98 drivers/pwm/sysfs.c pwm_get_state(pwm, &state); pwm 100 drivers/pwm/sysfs.c ret = pwm_apply_state(pwm, &state); pwm 110 drivers/pwm/sysfs.c const struct pwm_device *pwm = child_to_pwm_device(child); pwm 113 drivers/pwm/sysfs.c pwm_get_state(pwm, &state); pwm 123 drivers/pwm/sysfs.c struct pwm_device *pwm = export->pwm; pwm 133 drivers/pwm/sysfs.c pwm_get_state(pwm, &state); pwm 147 drivers/pwm/sysfs.c ret = pwm_apply_state(pwm, &state); pwm 158 drivers/pwm/sysfs.c const struct pwm_device *pwm = child_to_pwm_device(child); pwm 162 drivers/pwm/sysfs.c pwm_get_state(pwm, &state); pwm 182 drivers/pwm/sysfs.c struct pwm_device *pwm = export->pwm; pwm 195 drivers/pwm/sysfs.c pwm_get_state(pwm, &state); pwm 197 drivers/pwm/sysfs.c ret = pwm_apply_state(pwm, &state); pwm 207 drivers/pwm/sysfs.c struct pwm_device *pwm = child_to_pwm_device(child); pwm 211 drivers/pwm/sysfs.c ret = pwm_capture(pwm, &result, jiffies_to_msecs(HZ)); pwm 232 drivers/pwm/sysfs.c ATTRIBUTE_GROUPS(pwm); pwm 241 drivers/pwm/sysfs.c static int pwm_export_child(struct device *parent, struct pwm_device *pwm) pwm 247 drivers/pwm/sysfs.c if (test_and_set_bit(PWMF_EXPORTED, &pwm->flags)) pwm 252 drivers/pwm/sysfs.c clear_bit(PWMF_EXPORTED, &pwm->flags); pwm 256 drivers/pwm/sysfs.c export->pwm = pwm; pwm 263 drivers/pwm/sysfs.c dev_set_name(&export->child, "pwm%u", pwm->hwpwm); pwm 267 drivers/pwm/sysfs.c clear_bit(PWMF_EXPORTED, &pwm->flags); pwm 272 drivers/pwm/sysfs.c pwm_prop[0] = kasprintf(GFP_KERNEL, "EXPORT=pwm%u", pwm->hwpwm); pwm 285 drivers/pwm/sysfs.c static int pwm_unexport_child(struct device *parent, struct pwm_device *pwm) pwm 290 drivers/pwm/sysfs.c if (!test_and_clear_bit(PWMF_EXPORTED, &pwm->flags)) pwm 293 drivers/pwm/sysfs.c child = device_find_child(parent, pwm, pwm_unexport_match); pwm 297 drivers/pwm/sysfs.c pwm_prop[0] = kasprintf(GFP_KERNEL, "UNEXPORT=pwm%u", pwm->hwpwm); pwm 305 drivers/pwm/sysfs.c pwm_put(pwm); pwm 315 drivers/pwm/sysfs.c struct pwm_device *pwm; pwm 326 drivers/pwm/sysfs.c pwm = pwm_request_from_chip(chip, hwpwm, "sysfs"); pwm 327 drivers/pwm/sysfs.c if (IS_ERR(pwm)) pwm 328 drivers/pwm/sysfs.c return PTR_ERR(pwm); pwm 330 drivers/pwm/sysfs.c ret = pwm_export_child(parent, pwm); pwm 332 drivers/pwm/sysfs.c pwm_put(pwm); pwm 378 drivers/pwm/sysfs.c struct pwm_device *pwm, pwm 384 drivers/pwm/sysfs.c if (!test_bit(PWMF_EXPORTED, &pwm->flags)) pwm 387 drivers/pwm/sysfs.c child = device_find_child(parent, pwm, pwm_unexport_match); pwm 395 drivers/pwm/sysfs.c pwm_get_state(pwm, state); pwm 401 drivers/pwm/sysfs.c struct pwm_device *pwm, pwm 404 drivers/pwm/sysfs.c int ret = pwm_apply_state(pwm, state); pwm 419 drivers/pwm/sysfs.c struct pwm_device *pwm = &chip->pwms[i]; pwm 423 drivers/pwm/sysfs.c export = pwm_class_get_state(parent, pwm, &state); pwm 428 drivers/pwm/sysfs.c ret = pwm_class_apply_state(export, pwm, &state); pwm 443 drivers/pwm/sysfs.c struct pwm_device *pwm = &chip->pwms[i]; pwm 447 drivers/pwm/sysfs.c export = pwm_class_get_state(parent, pwm, &state); pwm 453 drivers/pwm/sysfs.c ret = pwm_class_apply_state(export, pwm, &state); pwm 515 drivers/pwm/sysfs.c struct pwm_device *pwm = &chip->pwms[i]; pwm 517 drivers/pwm/sysfs.c if (test_bit(PWMF_EXPORTED, &pwm->flags)) pwm 518 drivers/pwm/sysfs.c pwm_unexport_child(parent, pwm); pwm 228 drivers/regulator/max8973-regulator.c int pwm; pwm 233 drivers/regulator/max8973-regulator.c pwm = MAX8973_FPWM_EN_M; pwm 237 drivers/regulator/max8973-regulator.c pwm = 0; pwm 245 drivers/regulator/max8973-regulator.c MAX8973_FPWM_EN_M, pwm); pwm 29 drivers/regulator/pwm-regulator.c struct pwm_device *pwm; pwm 61 drivers/regulator/pwm-regulator.c pwm_get_state(drvdata->pwm, &pwm_state); pwm 89 drivers/regulator/pwm-regulator.c pwm_init_state(drvdata->pwm, &pstate); pwm 93 drivers/regulator/pwm-regulator.c ret = pwm_apply_state(drvdata->pwm, &pstate); pwm 121 drivers/regulator/pwm-regulator.c return pwm_enable(drvdata->pwm); pwm 128 drivers/regulator/pwm-regulator.c pwm_disable(drvdata->pwm); pwm 142 drivers/regulator/pwm-regulator.c return pwm_is_enabled(drvdata->pwm); pwm 158 drivers/regulator/pwm-regulator.c pwm_get_state(drvdata->pwm, &pstate); pwm 196 drivers/regulator/pwm-regulator.c pwm_init_state(drvdata->pwm, &pstate); pwm 219 drivers/regulator/pwm-regulator.c ret = pwm_apply_state(drvdata->pwm, &pstate); pwm 354 drivers/regulator/pwm-regulator.c drvdata->pwm = devm_pwm_get(&pdev->dev, NULL); pwm 355 drivers/regulator/pwm-regulator.c if (IS_ERR(drvdata->pwm)) { pwm 356 drivers/regulator/pwm-regulator.c ret = PTR_ERR(drvdata->pwm); pwm 373 drivers/regulator/pwm-regulator.c ret = pwm_adjust_config(drvdata->pwm); pwm 694 drivers/regulator/qcom_rpm-regulator.c bool pwm; pwm 715 drivers/regulator/qcom_rpm-regulator.c pwm = !of_property_read_bool(node, key); pwm 717 drivers/regulator/qcom_rpm-regulator.c ret = rpm_reg_set(vreg, &vreg->parts->pm, pwm); pwm 22 drivers/staging/greybus/pwm.c struct pwm_chip *pwm; pwm 190 drivers/staging/greybus/pwm.c static int gb_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) pwm 194 drivers/staging/greybus/pwm.c return gb_pwm_activate_operation(pwmc, pwm->hwpwm); pwm 197 drivers/staging/greybus/pwm.c static void gb_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) pwm 201 drivers/staging/greybus/pwm.c if (pwm_is_enabled(pwm)) pwm 204 drivers/staging/greybus/pwm.c gb_pwm_deactivate_operation(pwmc, pwm->hwpwm); pwm 207 drivers/staging/greybus/pwm.c static int gb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, pwm 212 drivers/staging/greybus/pwm.c return gb_pwm_config_operation(pwmc, pwm->hwpwm, duty_ns, period_ns); pwm 215 drivers/staging/greybus/pwm.c static int gb_pwm_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm, pwm 220 drivers/staging/greybus/pwm.c return gb_pwm_set_polarity_operation(pwmc, pwm->hwpwm, polarity); pwm 223 drivers/staging/greybus/pwm.c static int gb_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 227 drivers/staging/greybus/pwm.c return gb_pwm_enable_operation(pwmc, pwm->hwpwm); pwm 230 drivers/staging/greybus/pwm.c static void gb_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) pwm 234 drivers/staging/greybus/pwm.c gb_pwm_disable_operation(pwmc, pwm->hwpwm); pwm 252 drivers/staging/greybus/pwm.c struct pwm_chip *pwm; pwm 280 drivers/staging/greybus/pwm.c pwm = &pwmc->chip; pwm 282 drivers/staging/greybus/pwm.c pwm->dev = &gbphy_dev->dev; pwm 283 drivers/staging/greybus/pwm.c pwm->ops = &gb_pwm_ops; pwm 284 drivers/staging/greybus/pwm.c pwm->base = -1; /* Allocate base dynamically */ pwm 285 drivers/staging/greybus/pwm.c pwm->npwm = pwmc->pwm_max + 1; pwm 287 drivers/staging/greybus/pwm.c ret = pwmchip_add(pwm); pwm 30 drivers/video/backlight/88pm860x_bl.c int pwm; pwm 85 drivers/video/backlight/88pm860x_bl.c if (data->pwm) { pwm 87 drivers/video/backlight/88pm860x_bl.c PM8606_PWM_FREQ_MASK, data->pwm); pwm 179 drivers/video/backlight/88pm860x_bl.c &data->pwm); pwm 233 drivers/video/backlight/88pm860x_bl.c data->pwm = pdata->pwm; pwm 224 drivers/video/backlight/lm3533_bl.c static LM3533_ATTR_RW(pwm); pwm 265 drivers/video/backlight/lm3533_bl.c return lm3533_ctrlbank_set_pwm(&bl->cb, pdata->pwm); pwm 72 drivers/video/backlight/lp855x_bl.c struct pwm_device *pwm; pwm 238 drivers/video/backlight/lp855x_bl.c struct pwm_device *pwm; pwm 241 drivers/video/backlight/lp855x_bl.c if (!lp->pwm) { pwm 242 drivers/video/backlight/lp855x_bl.c pwm = devm_pwm_get(lp->dev, lp->chipname); pwm 243 drivers/video/backlight/lp855x_bl.c if (IS_ERR(pwm)) pwm 246 drivers/video/backlight/lp855x_bl.c lp->pwm = pwm; pwm 252 drivers/video/backlight/lp855x_bl.c pwm_apply_args(pwm); pwm 255 drivers/video/backlight/lp855x_bl.c pwm_config(lp->pwm, duty, period); pwm 257 drivers/video/backlight/lp855x_bl.c pwm_enable(lp->pwm); pwm 259 drivers/video/backlight/lp855x_bl.c pwm_disable(lp->pwm); pwm 48 drivers/video/backlight/lp8788_bl.c struct pwm_device *pwm; pwm 126 drivers/video/backlight/lp8788_bl.c struct pwm_device *pwm; pwm 136 drivers/video/backlight/lp8788_bl.c if (!bl->pwm) { pwm 137 drivers/video/backlight/lp8788_bl.c pwm = devm_pwm_get(dev, LP8788_DEV_BACKLIGHT); pwm 138 drivers/video/backlight/lp8788_bl.c if (IS_ERR(pwm)) { pwm 143 drivers/video/backlight/lp8788_bl.c bl->pwm = pwm; pwm 149 drivers/video/backlight/lp8788_bl.c pwm_apply_args(pwm); pwm 152 drivers/video/backlight/lp8788_bl.c pwm_config(bl->pwm, duty, period); pwm 154 drivers/video/backlight/lp8788_bl.c pwm_enable(bl->pwm); pwm 156 drivers/video/backlight/lp8788_bl.c pwm_disable(bl->pwm); pwm 24 drivers/video/backlight/pwm_bl.c struct pwm_device *pwm; pwm 48 drivers/video/backlight/pwm_bl.c pwm_get_state(pb->pwm, &state); pwm 57 drivers/video/backlight/pwm_bl.c pwm_apply_state(pb->pwm, &state); pwm 72 drivers/video/backlight/pwm_bl.c pwm_get_state(pb->pwm, &state); pwm 84 drivers/video/backlight/pwm_bl.c pwm_apply_state(pb->pwm, &state); pwm 96 drivers/video/backlight/pwm_bl.c pwm_get_state(pb->pwm, &state); pwm 124 drivers/video/backlight/pwm_bl.c pwm_get_state(pb->pwm, &state); pwm 126 drivers/video/backlight/pwm_bl.c pwm_apply_state(pb->pwm, &state); pwm 439 drivers/video/backlight/pwm_bl.c if (!pwm_is_enabled(pb->pwm)) pwm 529 drivers/video/backlight/pwm_bl.c pb->pwm = devm_pwm_get(&pdev->dev, NULL); pwm 530 drivers/video/backlight/pwm_bl.c if (IS_ERR(pb->pwm) && PTR_ERR(pb->pwm) != -EPROBE_DEFER && !node) { pwm 533 drivers/video/backlight/pwm_bl.c pb->pwm = pwm_request(data->pwm_id, "pwm-backlight"); pwm 536 drivers/video/backlight/pwm_bl.c if (IS_ERR(pb->pwm)) { pwm 537 drivers/video/backlight/pwm_bl.c ret = PTR_ERR(pb->pwm); pwm 546 drivers/video/backlight/pwm_bl.c pwm_init_state(pb->pwm, &state); pwm 557 drivers/video/backlight/pwm_bl.c ret = pwm_apply_state(pb->pwm, &state); pwm 593 drivers/video/backlight/pwm_bl.c pwm_get_state(pb->pwm, &state); pwm 629 drivers/video/backlight/pwm_bl.c pwm_free(pb->pwm); pwm 664 drivers/video/backlight/pwm_bl.c pwm_free(pb->pwm); pwm 82 drivers/video/fbdev/ssd1307fb.c struct pwm_device *pwm; pwm 306 drivers/video/fbdev/ssd1307fb.c par->pwm = pwm_get(&par->client->dev, NULL); pwm 307 drivers/video/fbdev/ssd1307fb.c if (IS_ERR(par->pwm)) { pwm 309 drivers/video/fbdev/ssd1307fb.c return PTR_ERR(par->pwm); pwm 316 drivers/video/fbdev/ssd1307fb.c pwm_apply_args(par->pwm); pwm 318 drivers/video/fbdev/ssd1307fb.c pwm_get_args(par->pwm, &pargs); pwm 322 drivers/video/fbdev/ssd1307fb.c pwm_config(par->pwm, par->pwm_period / 2, par->pwm_period); pwm 323 drivers/video/fbdev/ssd1307fb.c pwm_enable(par->pwm); pwm 326 drivers/video/fbdev/ssd1307fb.c par->pwm->pwm, par->pwm_period); pwm 767 drivers/video/fbdev/ssd1307fb.c pwm_disable(par->pwm); pwm 768 drivers/video/fbdev/ssd1307fb.c pwm_put(par->pwm); pwm 791 drivers/video/fbdev/ssd1307fb.c pwm_disable(par->pwm); pwm 792 drivers/video/fbdev/ssd1307fb.c pwm_put(par->pwm); pwm 17 include/linux/f75375s.h u8 pwm[2]; pwm 38 include/linux/leds-pca9532.h u8 pwm[2]; pwm 404 include/linux/mfd/88pm860x.h int pwm; pwm 49 include/linux/mfd/lm3533.h u8 pwm; /* 0 - 0x3f */ pwm 56 include/linux/mfd/lm3533.h u8 pwm; /* 0 - 0x3f */ pwm 80 include/linux/pwm.h unsigned int pwm; pwm 93 include/linux/pwm.h static inline void pwm_get_state(const struct pwm_device *pwm, pwm 96 include/linux/pwm.h *state = pwm->state; pwm 99 include/linux/pwm.h static inline bool pwm_is_enabled(const struct pwm_device *pwm) pwm 103 include/linux/pwm.h pwm_get_state(pwm, &state); pwm 108 include/linux/pwm.h static inline void pwm_set_period(struct pwm_device *pwm, unsigned int period) pwm 110 include/linux/pwm.h if (pwm) pwm 111 include/linux/pwm.h pwm->state.period = period; pwm 114 include/linux/pwm.h static inline unsigned int pwm_get_period(const struct pwm_device *pwm) pwm 118 include/linux/pwm.h pwm_get_state(pwm, &state); pwm 123 include/linux/pwm.h static inline void pwm_set_duty_cycle(struct pwm_device *pwm, unsigned int duty) pwm 125 include/linux/pwm.h if (pwm) pwm 126 include/linux/pwm.h pwm->state.duty_cycle = duty; pwm 129 include/linux/pwm.h static inline unsigned int pwm_get_duty_cycle(const struct pwm_device *pwm) pwm 133 include/linux/pwm.h pwm_get_state(pwm, &state); pwm 138 include/linux/pwm.h static inline enum pwm_polarity pwm_get_polarity(const struct pwm_device *pwm) pwm 142 include/linux/pwm.h pwm_get_state(pwm, &state); pwm 147 include/linux/pwm.h static inline void pwm_get_args(const struct pwm_device *pwm, pwm 150 include/linux/pwm.h *args = pwm->args; pwm 170 include/linux/pwm.h static inline void pwm_init_state(const struct pwm_device *pwm, pwm 176 include/linux/pwm.h pwm_get_state(pwm, state); pwm 179 include/linux/pwm.h pwm_get_args(pwm, &args); pwm 260 include/linux/pwm.h int (*request)(struct pwm_chip *chip, struct pwm_device *pwm); pwm 261 include/linux/pwm.h void (*free)(struct pwm_chip *chip, struct pwm_device *pwm); pwm 262 include/linux/pwm.h int (*capture)(struct pwm_chip *chip, struct pwm_device *pwm, pwm 264 include/linux/pwm.h int (*apply)(struct pwm_chip *chip, struct pwm_device *pwm, pwm 266 include/linux/pwm.h void (*get_state)(struct pwm_chip *chip, struct pwm_device *pwm, pwm 271 include/linux/pwm.h int (*config)(struct pwm_chip *chip, struct pwm_device *pwm, pwm 273 include/linux/pwm.h int (*set_polarity)(struct pwm_chip *chip, struct pwm_device *pwm, pwm 275 include/linux/pwm.h int (*enable)(struct pwm_chip *chip, struct pwm_device *pwm); pwm 276 include/linux/pwm.h void (*disable)(struct pwm_chip *chip, struct pwm_device *pwm); pwm 318 include/linux/pwm.h void pwm_free(struct pwm_device *pwm); pwm 319 include/linux/pwm.h int pwm_apply_state(struct pwm_device *pwm, const struct pwm_state *state); pwm 320 include/linux/pwm.h int pwm_adjust_config(struct pwm_device *pwm); pwm 330 include/linux/pwm.h static inline int pwm_config(struct pwm_device *pwm, int duty_ns, pwm 335 include/linux/pwm.h if (!pwm) pwm 341 include/linux/pwm.h pwm_get_state(pwm, &state); pwm 347 include/linux/pwm.h return pwm_apply_state(pwm, &state); pwm 356 include/linux/pwm.h static inline int pwm_enable(struct pwm_device *pwm) pwm 360 include/linux/pwm.h if (!pwm) pwm 363 include/linux/pwm.h pwm_get_state(pwm, &state); pwm 368 include/linux/pwm.h return pwm_apply_state(pwm, &state); pwm 375 include/linux/pwm.h static inline void pwm_disable(struct pwm_device *pwm) pwm 379 include/linux/pwm.h if (!pwm) pwm 382 include/linux/pwm.h pwm_get_state(pwm, &state); pwm 387 include/linux/pwm.h pwm_apply_state(pwm, &state); pwm 391 include/linux/pwm.h int pwm_capture(struct pwm_device *pwm, struct pwm_capture *result, pwm 393 include/linux/pwm.h int pwm_set_chip_data(struct pwm_device *pwm, void *data); pwm 394 include/linux/pwm.h void *pwm_get_chip_data(struct pwm_device *pwm); pwm 410 include/linux/pwm.h void pwm_put(struct pwm_device *pwm); pwm 418 include/linux/pwm.h void devm_pwm_put(struct device *dev, struct pwm_device *pwm); pwm 425 include/linux/pwm.h static inline void pwm_free(struct pwm_device *pwm) pwm 429 include/linux/pwm.h static inline int pwm_apply_state(struct pwm_device *pwm, pwm 435 include/linux/pwm.h static inline int pwm_adjust_config(struct pwm_device *pwm) pwm 440 include/linux/pwm.h static inline int pwm_config(struct pwm_device *pwm, int duty_ns, pwm 446 include/linux/pwm.h static inline int pwm_capture(struct pwm_device *pwm, pwm 453 include/linux/pwm.h static inline int pwm_enable(struct pwm_device *pwm) pwm 458 include/linux/pwm.h static inline void pwm_disable(struct pwm_device *pwm) pwm 462 include/linux/pwm.h static inline int pwm_set_chip_data(struct pwm_device *pwm, void *data) pwm 467 include/linux/pwm.h static inline void *pwm_get_chip_data(struct pwm_device *pwm) pwm 507 include/linux/pwm.h static inline void pwm_put(struct pwm_device *pwm) pwm 531 include/linux/pwm.h static inline void devm_pwm_put(struct device *dev, struct pwm_device *pwm) pwm 536 include/linux/pwm.h static inline void pwm_apply_args(struct pwm_device *pwm) pwm 562 include/linux/pwm.h state.polarity = pwm->args.polarity; pwm 563 include/linux/pwm.h state.period = pwm->args.period; pwm 565 include/linux/pwm.h pwm_apply_state(pwm, &state);