Lines Matching refs:pwr
65 struct tps6521x_pwrbutton *pwr = _pwr; in tps6521x_pb_irq() local
66 const struct tps6521x_data *tps_data = pwr->data; in tps6521x_pb_irq()
70 error = regmap_read(pwr->regmap, tps_data->reg_status, ®); in tps6521x_pb_irq()
72 dev_err(pwr->dev, "can't read register: %d\n", error); in tps6521x_pb_irq()
77 input_report_key(pwr->idev, KEY_POWER, 1); in tps6521x_pb_irq()
78 pm_wakeup_event(pwr->dev, 0); in tps6521x_pb_irq()
80 input_report_key(pwr->idev, KEY_POWER, 0); in tps6521x_pb_irq()
83 input_sync(pwr->idev); in tps6521x_pb_irq()
92 struct tps6521x_pwrbutton *pwr; in tps6521x_pb_probe() local
102 pwr = devm_kzalloc(dev, sizeof(*pwr), GFP_KERNEL); in tps6521x_pb_probe()
103 if (!pwr) in tps6521x_pb_probe()
106 pwr->data = match->data; in tps6521x_pb_probe()
112 idev->name = pwr->data->name; in tps6521x_pb_probe()
113 snprintf(pwr->phys, sizeof(pwr->phys), "%s/input0", in tps6521x_pb_probe()
114 pwr->data->name); in tps6521x_pb_probe()
115 idev->phys = pwr->phys; in tps6521x_pb_probe()
121 pwr->regmap = dev_get_regmap(dev->parent, NULL); in tps6521x_pb_probe()
122 pwr->dev = dev; in tps6521x_pb_probe()
123 pwr->idev = idev; in tps6521x_pb_probe()
134 pwr->data->name, pwr); in tps6521x_pb_probe()