summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-12-21 09:41:28 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-12-21 09:41:28 -0800
commit7a693ea78e3c48605a2d849fd241ff15561f10d5 (patch)
treef1d3b8939d2abc40d3bb160d2dcaaf696d8de2d6 /include
parent9cf5b508bd260d5693d337bcf1f9b82b961b6137 (diff)
parent8fa22f4b88e877c0811d2a0e506cf56755add554 (diff)
downloadlinux-7a693ea78e3c48605a2d849fd241ff15561f10d5.tar.bz2
Merge tag 'pwm/for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm updates from Thierry Reding: "Various changes across the board, mostly improvements and cleanups" * tag 'pwm/for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (42 commits) pwm: pca9685: Convert to i2c's .probe_new() pwm: sun4i: Propagate errors in .get_state() to the caller pwm: Handle .get_state() failures pwm: sprd: Propagate errors in .get_state() to the caller pwm: rockchip: Propagate errors in .get_state() to the caller pwm: mtk-disp: Propagate errors in .get_state() to the caller pwm: imx27: Propagate errors in .get_state() to the caller pwm: cros-ec: Propagate errors in .get_state() to the caller pwm: crc: Propagate errors in .get_state() to the caller leds: qcom-lpg: Propagate errors in .get_state() to the caller drm/bridge: ti-sn65dsi86: Propagate errors in .get_state() to the caller pwm/tracing: Also record trace events for failed API calls pwm: Make .get_state() callback return an error code pwm: pxa: Enable for MMP platform pwm: pxa: Add reference manual link and limitations pwm: pxa: Use abrupt shutdown mode pwm: pxa: Remove clk enable/disable from pxa_pwm_config pwm: pxa: Set duty cycle to 0 when disabling PWM pwm: pxa: Remove pxa_pwm_enable/disable pwm: mediatek: Add support for MT7986 ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/pwm.h4
-rw-r--r--include/trace/events/pwm.h20
2 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index bba492eea96c..161e91167b9c 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -276,8 +276,8 @@ struct pwm_ops {
struct pwm_capture *result, unsigned long timeout);
int (*apply)(struct pwm_chip *chip, struct pwm_device *pwm,
const struct pwm_state *state);
- void (*get_state)(struct pwm_chip *chip, struct pwm_device *pwm,
- struct pwm_state *state);
+ int (*get_state)(struct pwm_chip *chip, struct pwm_device *pwm,
+ struct pwm_state *state);
struct module *owner;
};
diff --git a/include/trace/events/pwm.h b/include/trace/events/pwm.h
index cf243de41cc8..12b35e4ff917 100644
--- a/include/trace/events/pwm.h
+++ b/include/trace/events/pwm.h
@@ -10,9 +10,9 @@
DECLARE_EVENT_CLASS(pwm,
- TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state),
+ TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state, int err),
- TP_ARGS(pwm, state),
+ TP_ARGS(pwm, state, err),
TP_STRUCT__entry(
__field(struct pwm_device *, pwm)
@@ -20,6 +20,7 @@ DECLARE_EVENT_CLASS(pwm,
__field(u64, duty_cycle)
__field(enum pwm_polarity, polarity)
__field(bool, enabled)
+ __field(int, err)
),
TP_fast_assign(
@@ -28,28 +29,27 @@ DECLARE_EVENT_CLASS(pwm,
__entry->duty_cycle = state->duty_cycle;
__entry->polarity = state->polarity;
__entry->enabled = state->enabled;
+ __entry->err = err;
),
- TP_printk("%p: period=%llu duty_cycle=%llu polarity=%d enabled=%d",
+ TP_printk("%p: period=%llu duty_cycle=%llu polarity=%d enabled=%d err=%d",
__entry->pwm, __entry->period, __entry->duty_cycle,
- __entry->polarity, __entry->enabled)
+ __entry->polarity, __entry->enabled, __entry->err)
);
DEFINE_EVENT(pwm, pwm_apply,
- TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state),
-
- TP_ARGS(pwm, state)
+ TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state, int err),
+ TP_ARGS(pwm, state, err)
);
DEFINE_EVENT(pwm, pwm_get,
- TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state),
-
- TP_ARGS(pwm, state)
+ TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state, int err),
+ TP_ARGS(pwm, state, err)
);
#endif /* _TRACE_PWM_H */