23 struct push_switch *psw = platform_get_drvdata(pdev);
25 unsigned int sw_value;
37 if (sw_value & (1 << psw_info->
bit)) {
50 static struct resource psw_power_resources[] = {
57 static struct resource psw_usl5p_resources[] = {
68 .irq_handler = psw_irq_handler,
75 .irq_handler = psw_irq_handler,
82 .irq_handler = psw_irq_handler,
89 .irq_handler = psw_irq_handler,
93 .name =
"push-switch",
95 .num_resources =
ARRAY_SIZE(psw_power_resources),
96 .resource = psw_power_resources,
98 .platform_data = &psw_power_platform_data,
103 .name =
"push-switch",
105 .num_resources =
ARRAY_SIZE(psw_usl5p_resources),
106 .resource = psw_usl5p_resources,
108 .platform_data = &psw1_platform_data,
113 .name =
"push-switch",
115 .num_resources =
ARRAY_SIZE(psw_usl5p_resources),
116 .resource = psw_usl5p_resources,
118 .platform_data = &psw2_platform_data,
123 .name =
"push-switch",
125 .num_resources =
ARRAY_SIZE(psw_usl5p_resources),
126 .resource = psw_usl5p_resources,
128 .platform_data = &psw3_platform_data,
133 &psw_power_switch_device,
139 static int __init psw_init(
void)