Skip to content

Commit

Permalink
pwm: omap-dmtimer: Drop unused header file
Browse files Browse the repository at this point in the history
pwm_omap_dmtimer.h is used only:
- to typedef struct omap_dm_timer to pwm_omap_dmtimer
- for macro PWM_OMAP_DMTIMER_TRIGGER_OVERFLOW_AND_COMPARE
Rest of the file is pretty mush unsed. So reuse omap_dm_timer
and OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE in pwm-omap-dmtimer.c
and delete the header file.

Acked-by: Tony Lindgren <[email protected]>
Signed-off-by: Lokesh Vutla <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
  • Loading branch information
lokeshvutla authored and thierryreding committed Mar 30, 2020
1 parent a1098c1 commit 54091b5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 103 deletions.
20 changes: 9 additions & 11 deletions drivers/pwm/pwm-omap-dmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <clocksource/timer-ti-dm.h>
#include <linux/platform_data/dmtimer-omap.h>
#include <linux/platform_data/pwm_omap_dmtimer.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/pwm.h>
Expand All @@ -34,7 +34,7 @@
struct pwm_omap_dmtimer_chip {
struct pwm_chip chip;
struct mutex mutex;
pwm_omap_dmtimer *dm_timer;
struct omap_dm_timer *dm_timer;
const struct omap_dm_timer_ops *pdata;
struct platform_device *dm_timer_pdev;
};
Expand Down Expand Up @@ -190,10 +190,9 @@ static int pwm_omap_dmtimer_config(struct pwm_chip *chip,
load_value, load_value, match_value, match_value);

omap->pdata->set_pwm(omap->dm_timer,
pwm_get_polarity(pwm) == PWM_POLARITY_INVERSED,
true,
PWM_OMAP_DMTIMER_TRIGGER_OVERFLOW_AND_COMPARE,
true);
pwm_get_polarity(pwm) == PWM_POLARITY_INVERSED,
true, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE,
true);

/* If config was called while timer was running it must be reenabled. */
if (timer_active)
Expand Down Expand Up @@ -221,10 +220,9 @@ static int pwm_omap_dmtimer_set_polarity(struct pwm_chip *chip,
*/
mutex_lock(&omap->mutex);
omap->pdata->set_pwm(omap->dm_timer,
polarity == PWM_POLARITY_INVERSED,
true,
PWM_OMAP_DMTIMER_TRIGGER_OVERFLOW_AND_COMPARE,
true);
polarity == PWM_POLARITY_INVERSED,
true, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE,
true);
mutex_unlock(&omap->mutex);

return 0;
Expand All @@ -246,7 +244,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
struct pwm_omap_dmtimer_chip *omap;
struct dmtimer_platform_data *timer_pdata;
const struct omap_dm_timer_ops *pdata;
pwm_omap_dmtimer *dm_timer;
struct omap_dm_timer *dm_timer;
u32 v;
int ret = 0;

Expand Down
3 changes: 1 addition & 2 deletions include/clocksource/timer-ti-dm.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,7 @@ int omap_dm_timers_active(void);

/*
* The below are inlined to optimize code size for system timers. Other code
* should not need these at all, see
* include/linux/platform_data/pwm_omap_dmtimer.h
* should not need these at all.
*/
#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,
Expand Down
90 changes: 0 additions & 90 deletions include/linux/platform_data/pwm_omap_dmtimer.h

This file was deleted.

0 comments on commit 54091b5

Please sign in to comment.