pwmc 28 drivers/staging/greybus/pwm.c static int gb_pwm_count_operation(struct gb_pwm_chip *pwmc) pwmc 33 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_PWM_COUNT, pwmc 37 drivers/staging/greybus/pwm.c pwmc->pwm_max = response.count; pwmc 41 drivers/staging/greybus/pwm.c static int gb_pwm_activate_operation(struct gb_pwm_chip *pwmc, pwmc 48 drivers/staging/greybus/pwm.c if (which > pwmc->pwm_max) pwmc 53 drivers/staging/greybus/pwm.c gbphy_dev = to_gbphy_dev(pwmc->chip.dev); pwmc 58 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_ACTIVATE, pwmc 66 drivers/staging/greybus/pwm.c static int gb_pwm_deactivate_operation(struct gb_pwm_chip *pwmc, pwmc 73 drivers/staging/greybus/pwm.c if (which > pwmc->pwm_max) pwmc 78 drivers/staging/greybus/pwm.c gbphy_dev = to_gbphy_dev(pwmc->chip.dev); pwmc 83 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_DEACTIVATE, pwmc 91 drivers/staging/greybus/pwm.c static int gb_pwm_config_operation(struct gb_pwm_chip *pwmc, pwmc 98 drivers/staging/greybus/pwm.c if (which > pwmc->pwm_max) pwmc 105 drivers/staging/greybus/pwm.c gbphy_dev = to_gbphy_dev(pwmc->chip.dev); pwmc 110 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_CONFIG, pwmc 118 drivers/staging/greybus/pwm.c static int gb_pwm_set_polarity_operation(struct gb_pwm_chip *pwmc, pwmc 125 drivers/staging/greybus/pwm.c if (which > pwmc->pwm_max) pwmc 131 drivers/staging/greybus/pwm.c gbphy_dev = to_gbphy_dev(pwmc->chip.dev); pwmc 136 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_POLARITY, pwmc 144 drivers/staging/greybus/pwm.c static int gb_pwm_enable_operation(struct gb_pwm_chip *pwmc, pwmc 151 drivers/staging/greybus/pwm.c if (which > pwmc->pwm_max) pwmc 156 drivers/staging/greybus/pwm.c gbphy_dev = to_gbphy_dev(pwmc->chip.dev); pwmc 161 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_ENABLE, pwmc 169 drivers/staging/greybus/pwm.c static int gb_pwm_disable_operation(struct gb_pwm_chip *pwmc, pwmc 176 drivers/staging/greybus/pwm.c if (which > pwmc->pwm_max) pwmc 181 drivers/staging/greybus/pwm.c ret = gb_operation_sync(pwmc->connection, GB_PWM_TYPE_DISABLE, pwmc 184 drivers/staging/greybus/pwm.c gbphy_dev = to_gbphy_dev(pwmc->chip.dev); pwmc 192 drivers/staging/greybus/pwm.c struct gb_pwm_chip *pwmc = pwm_chip_to_gb_pwm_chip(chip); pwmc 194 drivers/staging/greybus/pwm.c return gb_pwm_activate_operation(pwmc, pwm->hwpwm); pwmc 199 drivers/staging/greybus/pwm.c struct gb_pwm_chip *pwmc = pwm_chip_to_gb_pwm_chip(chip); pwmc 204 drivers/staging/greybus/pwm.c gb_pwm_deactivate_operation(pwmc, pwm->hwpwm); pwmc 210 drivers/staging/greybus/pwm.c struct gb_pwm_chip *pwmc = pwm_chip_to_gb_pwm_chip(chip); pwmc 212 drivers/staging/greybus/pwm.c return gb_pwm_config_operation(pwmc, pwm->hwpwm, duty_ns, period_ns); pwmc 218 drivers/staging/greybus/pwm.c struct gb_pwm_chip *pwmc = pwm_chip_to_gb_pwm_chip(chip); pwmc 220 drivers/staging/greybus/pwm.c return gb_pwm_set_polarity_operation(pwmc, pwm->hwpwm, polarity); pwmc 225 drivers/staging/greybus/pwm.c struct gb_pwm_chip *pwmc = pwm_chip_to_gb_pwm_chip(chip); pwmc 227 drivers/staging/greybus/pwm.c return gb_pwm_enable_operation(pwmc, pwm->hwpwm); pwmc 232 drivers/staging/greybus/pwm.c struct gb_pwm_chip *pwmc = pwm_chip_to_gb_pwm_chip(chip); pwmc 234 drivers/staging/greybus/pwm.c gb_pwm_disable_operation(pwmc, pwm->hwpwm); pwmc 251 drivers/staging/greybus/pwm.c struct gb_pwm_chip *pwmc; pwmc 255 drivers/staging/greybus/pwm.c pwmc = kzalloc(sizeof(*pwmc), GFP_KERNEL); pwmc 256 drivers/staging/greybus/pwm.c if (!pwmc) pwmc 267 drivers/staging/greybus/pwm.c pwmc->connection = connection; pwmc 268 drivers/staging/greybus/pwm.c gb_connection_set_data(connection, pwmc); pwmc 269 drivers/staging/greybus/pwm.c gb_gbphy_set_data(gbphy_dev, pwmc); pwmc 276 drivers/staging/greybus/pwm.c ret = gb_pwm_count_operation(pwmc); pwmc 280 drivers/staging/greybus/pwm.c pwm = &pwmc->chip; pwmc 285 drivers/staging/greybus/pwm.c pwm->npwm = pwmc->pwm_max + 1; pwmc 302 drivers/staging/greybus/pwm.c kfree(pwmc); pwmc 308 drivers/staging/greybus/pwm.c struct gb_pwm_chip *pwmc = gb_gbphy_get_data(gbphy_dev); pwmc 309 drivers/staging/greybus/pwm.c struct gb_connection *connection = pwmc->connection; pwmc 316 drivers/staging/greybus/pwm.c pwmchip_remove(&pwmc->chip); pwmc 319 drivers/staging/greybus/pwm.c kfree(pwmc);