From patchwork Fri Mar 17 22:56:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 664624 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9BFAC7618E for ; Fri, 17 Mar 2023 22:57:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230242AbjCQW5U (ORCPT ); Fri, 17 Mar 2023 18:57:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbjCQW5Q (ORCPT ); Fri, 17 Mar 2023 18:57:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5D172D162; Fri, 17 Mar 2023 15:57:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F418A60CA3; Fri, 17 Mar 2023 22:57:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B25BC433A0; Fri, 17 Mar 2023 22:57:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679093833; bh=c3WYbgfatFUXlt2kUOofkHvWoKbgirGFc4A+gjyj7bE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sNfBeWUmAoIMbt5c8TAoNvIj1fVw3JIlBQPkOpPM2xjh9iWKi+8b4sJp/F1PojNo7 qW20EJJcE+0CmD2ljfQDQj+sCKAbiI8+iiFK1zcMBRNlOHCx1iKmLE52EQV0P/vTSX k83pB5izv2lVunxcvNSrbdkVHcRnhusGazVtXJZR2Jf4rrjlgyarBBhTWlTD3stana 39I+6W3VSr8F1ikG5c4amr1uh4VCpVnaUZ45ZvpL/BV/3hWx8SIlAhGR0qHF+7aWfT lhWaQV9y6hqGcyKh20rEapLUF/9PG6VZFGG+JZN+5i0xo4MGPhS0373c7ME7t2/juB zaQfq53+wgIgw== Received: by mercury (Postfix, from userid 1000) id 8F2C31062107; Fri, 17 Mar 2023 23:57:08 +0100 (CET) From: Sebastian Reichel To: Sebastian Reichel Cc: Linus Walleij , Matti Vaittinen , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCHv3 06/14] power: supply: generic-adc-battery: drop charge now support Date: Fri, 17 Mar 2023 23:56:59 +0100 Message-Id: <20230317225707.1552512-7-sre@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230317225707.1552512-1-sre@kernel.org> References: <20230317225707.1552512-1-sre@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Drop CHARGE_NOW support, which requires a platform specific calculation method. Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel --- drivers/power/supply/generic-adc-battery.c | 4 ---- include/linux/power/generic-adc-battery.h | 2 -- 2 files changed, 6 deletions(-) diff --git a/drivers/power/supply/generic-adc-battery.c b/drivers/power/supply/generic-adc-battery.c index e20894460d7f..d07eeb7d46d3 100644 --- a/drivers/power/supply/generic-adc-battery.c +++ b/drivers/power/supply/generic-adc-battery.c @@ -72,7 +72,6 @@ static const enum power_supply_property gab_props[] = { POWER_SUPPLY_PROP_STATUS, POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN, - POWER_SUPPLY_PROP_CHARGE_NOW, POWER_SUPPLY_PROP_VOLTAGE_NOW, POWER_SUPPLY_PROP_CURRENT_NOW, POWER_SUPPLY_PROP_TECHNOLOGY, @@ -166,9 +165,6 @@ static int gab_get_property(struct power_supply *psy, case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN: val->intval = 0; break; - case POWER_SUPPLY_PROP_CHARGE_NOW: - val->intval = pdata->cal_charge(result); - break; case POWER_SUPPLY_PROP_VOLTAGE_NOW: case POWER_SUPPLY_PROP_CURRENT_NOW: case POWER_SUPPLY_PROP_POWER_NOW: diff --git a/include/linux/power/generic-adc-battery.h b/include/linux/power/generic-adc-battery.h index 50eb4bf28286..54434e4304d3 100644 --- a/include/linux/power/generic-adc-battery.h +++ b/include/linux/power/generic-adc-battery.h @@ -10,11 +10,9 @@ * struct gab_platform_data - platform_data for generic adc iio battery driver. * @battery_info: recommended structure to specify static power supply * parameters - * @cal_charge: calculate charge level. */ struct gab_platform_data { struct power_supply_info battery_info; - int (*cal_charge)(long value); }; #endif /* GENERIC_ADC_BATTERY_H */