From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1C5EC2D0B1 for ; Thu, 6 Feb 2020 07:05:06 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 49BFA206CC for ; Thu, 6 Feb 2020 07:05:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="b0M0Qxj+"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="bR9weuLc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49BFA206CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A6E641662; Thu, 6 Feb 2020 08:04:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A6E641662 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1580972703; bh=UIbNFNq2ueZDMhOzV3jBB7G8+i5I+5CcWIv3Kr11RKU=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=b0M0Qxj+rriHHViwBCJVM+nuxipzw2c7NVeBFoHDROeKhDZ/9p0/R9bpB2FxLUN1L BEQIcrkNpa8GRq4xoxtQUIu8FdpXjIt0fsTyv4Zf0Bkut/RjkOYGUFOVJ1edaDBwfG 22sH3UIZ2Er6X5MC7u4ga060SjhOerxKYbdRzwl4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5BA44F80212; Thu, 6 Feb 2020 08:03:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 22B5BF80148; Wed, 5 Feb 2020 20:01:16 +0100 (CET) Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 42B27F800E2 for ; Wed, 5 Feb 2020 20:01:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 42B27F800E2 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="bR9weuLc" Received: by mail-pj1-x1042.google.com with SMTP id d5so1363007pjz.5 for ; Wed, 05 Feb 2020 11:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FLjc0JgPDo6YSjN7JXnggvc84UnImf4k6JPXCkUl0v0=; b=bR9weuLclU24y9eL3hxVwCblZjrsjNamwVklbwW09hJwVbch7JZc0gxQN1ejhtHpFH 4PsUr/VhknEEzS+7GaaKOPgobRKvdHXBLEkU2Kb3xAcydxtFm+HCCrdOBXjI1gUE21OB TACFuCNW60qXMBisphE3xH1VgP8H/mi1Pox44= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FLjc0JgPDo6YSjN7JXnggvc84UnImf4k6JPXCkUl0v0=; b=PO0IZg6+zRAfyhykzYM0WUn5SXHHSA5edIVxqJl1gEtI811aFIEjTcc+IGEuOmYj95 5W7ge86vFCZYD8keJXj0gB4nStI0oIKccEkeEC119Ps5alpY0ycIPGOauujsChHiQ6f9 7FoEcZVACYQmDVB+72astvjAA9WYukeGbTMhHiBGTg4WrCy5zl0JOBVdHcmu5U3xii3r 2Je0MSN4GekVN97GvXuR4Ufiz5Ar6YLJxoh7qPnzsIQvd6lJtlQP11x2xvW8wcCa2l1s EirK2xr+6CqcPG2pdWALtL8CXo5/J3kBC/8PMp9Vo9smWoJcbnTerPW+oyfoC/jF+ZCB U97g== X-Gm-Message-State: APjAAAWcmNDZqd1LVU4AKfHi3U31i06L9URzHf3pinqQHOB4icmbd3rZ +ggxBvF0DXSV2Agpmdo6JePGaQ== X-Google-Smtp-Source: APXvYqxwndnH6icf+nujrNxPvSLToK8gpjcvNLigfeOHRVMdA3Av1KaK3pTOeyI+0EA4c5+TdQ92sw== X-Received: by 2002:a17:90a:71c1:: with SMTP id m1mr7138445pjs.34.1580929267864; Wed, 05 Feb 2020 11:01:07 -0800 (PST) Received: from pmalani2.mtv.corp.google.com ([2620:15c:202:201:172e:4646:c089:ce59]) by smtp.gmail.com with ESMTPSA id u23sm257224pfm.29.2020.02.05.11.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 11:01:07 -0800 (PST) From: Prashant Malani To: linux-kernel@vger.kernel.org Date: Wed, 5 Feb 2020 10:59:53 -0800 Message-Id: <20200205190028.183069-1-pmalani@chromium.org> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 06 Feb 2020 08:03:55 +0100 Cc: Alexandre Belloni , Neil Armstrong , "open list:IIO SUBSYSTEM AND DRIVERS" , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Benjamin Tissoires , "open list:I2C SUBSYSTEM HOST DRIVERS" , Peter Meerwald-Stadler , Guenter Roeck , Fabien Lahoudere , Rushikesh S Kadam , Cheng-Yi Chiang , "open list:REAL TIME CLOCK RTC SUBSYSTEM" , Lars-Peter Clausen , Lee Jones , Takashi Iwai , Sebastian Reichel , Evan Green , Chanwoo Choi , MyungJoo Ham , Wolfram Sang , "open list:HID CORE LAYER" , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , "open list:MEDIA INPUT INFRASTRUCTURE V4L/DVB" , "open list:PWM SUBSYSTEM" , "open list:POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS" , Mauro Carvalho Chehab , Jiri Kosina , Enric Balletbo i Serra , Mark Brown , Sebastian Reichel , Jonathan Cameron , Gwendal Grignou , Andy Shevchenko , Benson Leung , Alessandro Zummo , Liam Girdwood , Akshu Agrawal , Thierry Reding , Prashant Malani , Hartmut Knaack , Hans Verkuil , Jonathan Cameron Subject: [alsa-devel] [PATCH v2 00/17] platform/chrome: Replace cros_ec_cmd_xfer_status X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Many callers of cros_ec_cmd_xfer_status() use similar setup and cleanup code, including setting up the cros_ec_command message struct and copying the received buffer. This series introduces a replacement function cros_ec_cmd() that performs this setup and teardown, and then updates all call sites that used xfer_status() to use the new function instead. The final patch in the series drops cros_ec_cmd_xfer_status() altogether. Changes in v2: - Renamed new function to cros_ec_cmd() - Added a "result" pointer argument, for call-sites that are interested in the EC command result. - Updated subsequent patches to new function name and parameter list. - Used C99 element setting to initialize some structs directly rather than zeroing them, then setting them. v1: https://lkml.org/lkml/2020/1/30/802 Prashant Malani (17): platform/chrome: Add EC command msg wrapper platform/chrome: chardev: Use cros_ec_cmd() platform/chrome: proto: Use cros_ec_cmd() platform/chrome: usbpd_logger: Use cros_ec_cmd() platform/chrome: sensorhub: Use cros_ec_cmd() platform/chrome: debugfs: Use cros_ec_cmd() platform/chrome: sysfs: Use cros_ec_cmd() extcon: cros_ec: Use cros_ec_cmd() hid: google-hammer: Use cros_ec_cmd() iio: cros_ec: Use cros_ec_cmd() ASoC: cros_ec_codec: Use cros_ec_cmd() power: supply: cros: Use cros_ec_cmd() pwm: cros-ec: Remove cros_ec_cmd_xfer_status() rtc: cros-ec: Use cros_ec_cmd() media: cros-ec-cec: Use cros_ec_cmd() i2c: cros-ec-tunnel: Use cros_ec_cmd() platform/chrome: Drop cros_ec_cmd_xfer_status() drivers/extcon/extcon-usbc-cros-ec.c | 61 ++------ drivers/hid/hid-google-hammer.c | 23 +-- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 22 ++- .../cros_ec_sensors/cros_ec_sensors_core.c | 25 ++-- .../media/platform/cros-ec-cec/cros-ec-cec.c | 45 +++--- drivers/platform/chrome/cros_ec_chardev.c | 17 +-- drivers/platform/chrome/cros_ec_debugfs.c | 131 ++++++------------ drivers/platform/chrome/cros_ec_proto.c | 76 ++++++---- drivers/platform/chrome/cros_ec_sensorhub.c | 30 ++-- drivers/platform/chrome/cros_ec_sysfs.c | 103 ++++++-------- drivers/platform/chrome/cros_usbpd_logger.c | 12 +- drivers/power/supply/cros_usbpd-charger.c | 58 ++------ drivers/pwm/pwm-cros-ec.c | 59 +++----- drivers/rtc/rtc-cros-ec.c | 27 ++-- include/linux/platform_data/cros_ec_proto.h | 5 +- sound/soc/codecs/cros_ec_codec.c | 119 ++++++---------- 16 files changed, 277 insertions(+), 536 deletions(-) -- 2.25.0.341.g760bfbb309-goog _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel