static int sec_fuelgauge_suspend(
				struct i2c_client *client, pm_message_t state)
{
	if (!sec_hal_fg_suspend(client))
		dev_err(&client->dev,
			"%s: Failed to Suspend Fuelgauge\n", __func__);

	return 0;
}
예제 #2
0
static int sec_fuelgauge_suspend(struct device *dev)
{
	struct sec_fuelgauge_info *fuelgauge = dev_get_drvdata(dev);

	if (!sec_hal_fg_suspend(fuelgauge->client))
		dev_err(&fuelgauge->client->dev,
			"%s: Failed to Suspend Fuelgauge\n", __func__);

	return 0;
}
static int sec_fuelgauge_suspend(struct device *dev)
{
	struct i2c_client *client =
		container_of(dev, struct i2c_client, dev);

	if (!sec_hal_fg_suspend(client))
		dev_err(dev, "%s: Failed to Suspend Fuelgauge\n", __func__);

	return 0;
}
static int sec_fuelgauge_suspend(struct device *dev)
{
	struct sec_fuelgauge_info *fuelgauge = dev_get_drvdata(dev);
	struct power_supply *psy_battery;

	psy_battery = get_power_supply_by_name("battery");
	if (!psy_battery) {
		pr_err("%s : can't get battery psy\n", __func__);
	} else {
		struct sec_battery_info *battery;
		battery = container_of(psy_battery, struct sec_battery_info, psy_bat);

		battery->fuelgauge_in_sleep = true;
		dev_info(&fuelgauge->client->dev, "%s fuelgauge in sleep (%d)\n",
			__func__, battery->fuelgauge_in_sleep);
	}
	if (!sec_hal_fg_suspend(fuelgauge->client))
		dev_err(&fuelgauge->client->dev,
			"%s: Failed to Suspend Fuelgauge\n", __func__);

	return 0;
}