@@ -100,8 +100,6 @@ struct lpc18xx_pwm_chip {
100
100
u64 max_period_ns ;
101
101
unsigned int period_event ;
102
102
unsigned long event_map ;
103
- struct mutex res_lock ;
104
- struct mutex period_lock ;
105
103
struct lpc18xx_pwm_data channeldata [LPC18XX_NUM_PWMS ];
106
104
};
107
105
@@ -129,8 +127,6 @@ static void lpc18xx_pwm_set_conflict_res(struct lpc18xx_pwm_chip *lpc18xx_pwm,
129
127
{
130
128
u32 val ;
131
129
132
- mutex_lock (& lpc18xx_pwm -> res_lock );
133
-
134
130
/*
135
131
* Simultaneous set and clear may happen on an output, that is the case
136
132
* when duty_ns == period_ns. LPC18xx SCT allows to set a conflict
@@ -140,8 +136,6 @@ static void lpc18xx_pwm_set_conflict_res(struct lpc18xx_pwm_chip *lpc18xx_pwm,
140
136
val &= ~LPC18XX_PWM_RES_MASK (pwm -> hwpwm );
141
137
val |= LPC18XX_PWM_RES (pwm -> hwpwm , action );
142
138
lpc18xx_pwm_writel (lpc18xx_pwm , LPC18XX_PWM_RES_BASE , val );
143
-
144
- mutex_unlock (& lpc18xx_pwm -> res_lock );
145
139
}
146
140
147
141
static void lpc18xx_pwm_config_period (struct pwm_chip * chip , u64 period_ns )
@@ -200,8 +194,6 @@ static int lpc18xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
200
194
return - ERANGE ;
201
195
}
202
196
203
- mutex_lock (& lpc18xx_pwm -> period_lock );
204
-
205
197
requested_events = bitmap_weight (& lpc18xx_pwm -> event_map ,
206
198
LPC18XX_PWM_EVENT_MAX );
207
199
@@ -214,7 +206,6 @@ static int lpc18xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
214
206
lpc18xx_pwm -> period_ns ) {
215
207
dev_err (pwmchip_parent (chip ), "conflicting period requested for PWM %u\n" ,
216
208
pwm -> hwpwm );
217
- mutex_unlock (& lpc18xx_pwm -> period_lock );
218
209
return - EBUSY ;
219
210
}
220
211
@@ -224,8 +215,6 @@ static int lpc18xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
224
215
lpc18xx_pwm_config_period (chip , period_ns );
225
216
}
226
217
227
- mutex_unlock (& lpc18xx_pwm -> period_lock );
228
-
229
218
lpc18xx_pwm_config_duty (chip , pwm , duty_ns );
230
219
231
220
return 0 ;
@@ -377,9 +366,6 @@ static int lpc18xx_pwm_probe(struct platform_device *pdev)
377
366
if (lpc18xx_pwm -> clk_rate > NSEC_PER_SEC )
378
367
return dev_err_probe (& pdev -> dev , - EINVAL , "pwm clock to fast\n" );
379
368
380
- mutex_init (& lpc18xx_pwm -> res_lock );
381
- mutex_init (& lpc18xx_pwm -> period_lock );
382
-
383
369
lpc18xx_pwm -> max_period_ns =
384
370
mul_u64_u64_div_u64 (NSEC_PER_SEC , LPC18XX_PWM_TIMER_MAX , lpc18xx_pwm -> clk_rate );
385
371
0 commit comments