Lines Matching refs:the_menelaus
169 static struct menelaus_chip *the_menelaus; variable
173 int val = i2c_smbus_write_byte_data(the_menelaus->client, reg, value); in menelaus_write_reg()
185 int val = i2c_smbus_read_byte_data(the_menelaus->client, reg); in menelaus_read_reg()
197 the_menelaus->mask2 &= ~(1 << irq); in menelaus_enable_irq()
199 the_menelaus->mask2); in menelaus_enable_irq()
201 the_menelaus->mask1 &= ~(1 << irq); in menelaus_enable_irq()
203 the_menelaus->mask1); in menelaus_enable_irq()
211 the_menelaus->mask2 |= (1 << irq); in menelaus_disable_irq()
213 the_menelaus->mask2); in menelaus_disable_irq()
215 the_menelaus->mask1 |= (1 << irq); in menelaus_disable_irq()
217 the_menelaus->mask1); in menelaus_disable_irq()
235 mutex_lock(&the_menelaus->lock); in menelaus_add_irq_work()
236 the_menelaus->handlers[irq] = handler; in menelaus_add_irq_work()
238 mutex_unlock(&the_menelaus->lock); in menelaus_add_irq_work()
248 mutex_lock(&the_menelaus->lock); in menelaus_remove_irq_work()
250 the_menelaus->handlers[irq] = NULL; in menelaus_remove_irq_work()
251 mutex_unlock(&the_menelaus->lock); in menelaus_remove_irq_work()
291 mutex_lock(&the_menelaus->lock); in menelaus_set_mmc_opendrain()
294 mutex_unlock(&the_menelaus->lock); in menelaus_set_mmc_opendrain()
310 mutex_unlock(&the_menelaus->lock); in menelaus_set_mmc_opendrain()
320 mutex_lock(&the_menelaus->lock); in menelaus_set_slot_sel()
331 mutex_unlock(&the_menelaus->lock); in menelaus_set_slot_sel()
345 mutex_lock(&the_menelaus->lock); in menelaus_set_mmc_slot()
393 mutex_unlock(&the_menelaus->lock); in menelaus_set_mmc_slot()
403 the_menelaus->mmc_callback_data = data; in menelaus_register_mmc_callback()
404 the_menelaus->mmc_callback = callback; in menelaus_register_mmc_callback()
431 the_menelaus->mmc_callback = NULL; in menelaus_unregister_mmc_callback()
432 the_menelaus->mmc_callback_data = NULL; in menelaus_unregister_mmc_callback()
453 struct i2c_client *c = the_menelaus->client; in menelaus_set_voltage()
455 mutex_lock(&the_menelaus->lock); in menelaus_set_voltage()
472 mutex_unlock(&the_menelaus->lock); in menelaus_set_voltage()
525 struct i2c_client *c = the_menelaus->client; in menelaus_set_vcore_hw()
539 mutex_lock(&the_menelaus->lock); in menelaus_set_vcore_hw()
546 if (!the_menelaus->vcore_hw_mode) { in menelaus_set_vcore_hw()
551 the_menelaus->vcore_hw_mode = 1; in menelaus_set_vcore_hw()
555 mutex_unlock(&the_menelaus->lock); in menelaus_set_vcore_hw()
734 struct i2c_client *c = the_menelaus->client; in menelaus_set_regulator_sleep()
736 mutex_lock(&the_menelaus->lock); in menelaus_set_regulator_sleep()
753 mutex_unlock(&the_menelaus->lock); in menelaus_set_regulator_sleep()
832 if (the_menelaus->rtc_control & RTC_CTRL_MODE12) { in menelaus_to_time()
855 if (the_menelaus->rtc_control & RTC_CTRL_MODE12) { in time_to_menelaus()
881 dev_err(&the_menelaus->client->dev, "rtc write reg %02x, err %d\n", in time_to_menelaus()
905 status = i2c_transfer(the_menelaus->client->adapter, msg, 2); in menelaus_read_time()
927 dev_err(&the_menelaus->client->dev, "rtc write reg %02x " in menelaus_set_time()
935 dev_err(&the_menelaus->client->dev, "rtc commit time, err %d\n", in menelaus_set_time()
960 status = i2c_transfer(the_menelaus->client->adapter, msg, 2); in menelaus_read_alarm()
968 w->enabled = !!(the_menelaus->rtc_control & RTC_CTRL_AL_EN); in menelaus_read_alarm()
980 if (the_menelaus->client->irq <= 0 && w->enabled) in menelaus_set_alarm()
984 if (the_menelaus->rtc_control & RTC_CTRL_AL_EN) { in menelaus_set_alarm()
985 the_menelaus->rtc_control &= ~RTC_CTRL_AL_EN; in menelaus_set_alarm()
987 the_menelaus->rtc_control); in menelaus_set_alarm()
999 the_menelaus->rtc_control |= RTC_CTRL_AL_EN; in menelaus_set_alarm()
1001 the_menelaus->rtc_control); in menelaus_set_alarm()
1019 if (the_menelaus->client->irq <= 0) in menelaus_ioctl()
1025 if (the_menelaus->rtc_control & RTC_CTRL_AL_EN) in menelaus_ioctl()
1027 the_menelaus->rtc_control |= RTC_CTRL_AL_EN; in menelaus_ioctl()
1030 if (!(the_menelaus->rtc_control & RTC_CTRL_AL_EN)) in menelaus_ioctl()
1032 the_menelaus->rtc_control &= ~RTC_CTRL_AL_EN; in menelaus_ioctl()
1036 if (the_menelaus->uie) in menelaus_ioctl()
1042 the_menelaus->uie = 1; in menelaus_ioctl()
1045 if (!the_menelaus->uie) in menelaus_ioctl()
1049 the_menelaus->uie = 0; in menelaus_ioctl()
1054 return menelaus_write_reg(MENELAUS_RTC_CTRL, the_menelaus->rtc_control); in menelaus_ioctl()
1077 the_menelaus->rtc_control &= ~RTC_CTRL_AL_EN; in menelaus_rtc_alarm_work()
1078 menelaus_write_reg(MENELAUS_RTC_CTRL, the_menelaus->rtc_control); in menelaus_rtc_alarm_work()
1128 the_menelaus->rtc = NULL; in menelaus_rtc_init()
1154 if (the_menelaus) { in menelaus_probe()
1166 the_menelaus = menelaus; in menelaus_probe()
1231 the_menelaus = NULL; in menelaus_remove()