@@ -132,7 +132,8 @@ struct intel_community_context {
132
132
for_each_intel_pad_group(pctrl, community, grp) \
133
133
if (grp->gpio_base == INTEL_GPIO_BASE_NOMAP) {} else
134
134
135
- const struct intel_community * intel_get_community (struct intel_pinctrl * pctrl , unsigned int pin )
135
+ const struct intel_community * intel_get_community (const struct intel_pinctrl * pctrl ,
136
+ unsigned int pin )
136
137
{
137
138
const struct intel_community * community ;
138
139
@@ -181,7 +182,7 @@ static void __iomem *intel_get_padcfg(struct intel_pinctrl *pctrl,
181
182
return community -> pad_regs + reg + padno * nregs * 4 ;
182
183
}
183
184
184
- static bool intel_pad_owned_by_host (struct intel_pinctrl * pctrl , unsigned int pin )
185
+ static bool intel_pad_owned_by_host (const struct intel_pinctrl * pctrl , unsigned int pin )
185
186
{
186
187
const struct intel_community * community ;
187
188
const struct intel_padgroup * padgrp ;
@@ -206,7 +207,7 @@ static bool intel_pad_owned_by_host(struct intel_pinctrl *pctrl, unsigned int pi
206
207
return !(readl (padown ) & PADOWN_MASK (gpp_offset ));
207
208
}
208
209
209
- static bool intel_pad_acpi_mode (struct intel_pinctrl * pctrl , unsigned int pin )
210
+ static bool intel_pad_acpi_mode (const struct intel_pinctrl * pctrl , unsigned int pin )
210
211
{
211
212
const struct intel_community * community ;
212
213
const struct intel_padgroup * padgrp ;
@@ -248,7 +249,7 @@ enum {
248
249
PAD_LOCKED_FULL = PAD_LOCKED | PAD_LOCKED_TX ,
249
250
};
250
251
251
- static int intel_pad_locked (struct intel_pinctrl * pctrl , unsigned int pin )
252
+ static int intel_pad_locked (const struct intel_pinctrl * pctrl , unsigned int pin )
252
253
{
253
254
const struct intel_community * community ;
254
255
const struct intel_padgroup * padgrp ;
@@ -286,27 +287,27 @@ static int intel_pad_locked(struct intel_pinctrl *pctrl, unsigned int pin)
286
287
return ret ;
287
288
}
288
289
289
- static bool intel_pad_is_unlocked (struct intel_pinctrl * pctrl , unsigned int pin )
290
+ static bool intel_pad_is_unlocked (const struct intel_pinctrl * pctrl , unsigned int pin )
290
291
{
291
292
return (intel_pad_locked (pctrl , pin ) & PAD_LOCKED ) == PAD_UNLOCKED ;
292
293
}
293
294
294
- static bool intel_pad_usable (struct intel_pinctrl * pctrl , unsigned int pin )
295
+ static bool intel_pad_usable (const struct intel_pinctrl * pctrl , unsigned int pin )
295
296
{
296
297
return intel_pad_owned_by_host (pctrl , pin ) && intel_pad_is_unlocked (pctrl , pin );
297
298
}
298
299
299
300
int intel_get_groups_count (struct pinctrl_dev * pctldev )
300
301
{
301
- struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
302
+ const struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
302
303
303
304
return pctrl -> soc -> ngroups ;
304
305
}
305
306
EXPORT_SYMBOL_NS_GPL (intel_get_groups_count , PINCTRL_INTEL );
306
307
307
308
const char * intel_get_group_name (struct pinctrl_dev * pctldev , unsigned int group )
308
309
{
309
- struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
310
+ const struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
310
311
311
312
return pctrl -> soc -> groups [group ].grp .name ;
312
313
}
@@ -315,7 +316,7 @@ EXPORT_SYMBOL_NS_GPL(intel_get_group_name, PINCTRL_INTEL);
315
316
int intel_get_group_pins (struct pinctrl_dev * pctldev , unsigned int group ,
316
317
const unsigned int * * pins , unsigned int * npins )
317
318
{
318
- struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
319
+ const struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
319
320
320
321
* pins = pctrl -> soc -> groups [group ].grp .pins ;
321
322
* npins = pctrl -> soc -> groups [group ].grp .npins ;
@@ -383,15 +384,15 @@ static const struct pinctrl_ops intel_pinctrl_ops = {
383
384
384
385
int intel_get_functions_count (struct pinctrl_dev * pctldev )
385
386
{
386
- struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
387
+ const struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
387
388
388
389
return pctrl -> soc -> nfunctions ;
389
390
}
390
391
EXPORT_SYMBOL_NS_GPL (intel_get_functions_count , PINCTRL_INTEL );
391
392
392
393
const char * intel_get_function_name (struct pinctrl_dev * pctldev , unsigned int function )
393
394
{
394
- struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
395
+ const struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
395
396
396
397
return pctrl -> soc -> functions [function ].func .name ;
397
398
}
@@ -400,7 +401,7 @@ EXPORT_SYMBOL_NS_GPL(intel_get_function_name, PINCTRL_INTEL);
400
401
int intel_get_function_groups (struct pinctrl_dev * pctldev , unsigned int function ,
401
402
const char * const * * groups , unsigned int * const ngroups )
402
403
{
403
- struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
404
+ const struct intel_pinctrl * pctrl = pinctrl_dev_get_drvdata (pctldev );
404
405
405
406
* groups = pctrl -> soc -> functions [function ].func .groups ;
406
407
* ngroups = pctrl -> soc -> functions [function ].func .ngroups ;
@@ -952,7 +953,7 @@ static const struct pinctrl_desc intel_pinctrl_desc = {
952
953
* Return: a pin number and pointers to the community and pad group, which
953
954
* the pin belongs to, or negative error code if translation can't be done.
954
955
*/
955
- static int intel_gpio_to_pin (struct intel_pinctrl * pctrl , unsigned int offset ,
956
+ static int intel_gpio_to_pin (const struct intel_pinctrl * pctrl , unsigned int offset ,
956
957
const struct intel_community * * community ,
957
958
const struct intel_padgroup * * padgrp )
958
959
{
@@ -982,7 +983,7 @@ static int intel_gpio_to_pin(struct intel_pinctrl *pctrl, unsigned int offset,
982
983
*
983
984
* Return: a GPIO offset, or negative error code if translation can't be done.
984
985
*/
985
- static int intel_pin_to_gpio (struct intel_pinctrl * pctrl , int pin )
986
+ static int intel_pin_to_gpio (const struct intel_pinctrl * pctrl , int pin )
986
987
{
987
988
const struct intel_community * community ;
988
989
const struct intel_padgroup * padgrp ;
0 commit comments