Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2761637rwb; Fri, 2 Dec 2022 14:50:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf6McFhNzCFVMHC4b0khI/LEBQ2iT+jWy7u4V/ALLdd4g9h4AEpaGSHXfntkrgdIg5ZBo05D X-Received: by 2002:a17:903:1106:b0:189:528b:7a14 with SMTP id n6-20020a170903110600b00189528b7a14mr46301464plh.62.1670021402436; Fri, 02 Dec 2022 14:50:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670021402; cv=none; d=google.com; s=arc-20160816; b=FpXk4J9Afnk68wyIOG8pcLYVHa7vvaH3mmgmDTAvMLEMfCsAe9ysZ/5yv0pbIHF17J 5is64Mr8j87t0NlziNlM6VfOlvYJUa4b+xeXiAaL/6okZERaatH+7ozEqAdwkqisFEtr wwCP8vozqzXTbgl1Iog1xwjB2v+cp8o39dRGv2GB/LPvDP+GjrkbhW34U2buNOrSqKTV /dQhxk9nUxTXJRLXY0IbqdTnKAcY3LN1kyXL4LQRrXIy1DWC6WVjcvTvSMbaUWFK6WTU zsA385+QC4t/vIkoRdX8dNxo/qgUJgi9n5hHJ5MoL3iKyRliJL2QtWJYNOK5vTj7V0C2 Dqng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JJBRCJuPeD4sVOppZ4nKmrCrzkzn8rXvXzlwDq8fCmI=; b=tONSC8/nNX17dL4+A7DtC3WOEKcYHEhEZQK5zKbbxksFxQpFmSx3WCdhFBG+ECPu5O BAClIHly2Gm1NlVh+drEGVYa8oNuMMce8YsG9A6LMsmhWRoQHHcKPeBhsN1ept0+ye45 V5hGg1YnDJ8iJ94TjnKRuNe5qdIyhWLBJn18dLrN6ugmgTNvSumUj9iIhLZb3hn/wtyb c+gQNu6wR1kfbH0w33vQcb0UsNX+zgCvXccIQ3tRKYj4V8oCKjSQGjIssfnD0LHIA9K3 1RSpTGkbD8v0Tmay7FC6iUb00s/4tJlTKWLrOGfKd9IBfJr0EXHJlvE95gVXYLweAT44 bjRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GGe+iTwG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e27-20020a630f1b000000b00477b10def88si8341517pgl.696.2022.12.02.14.49.52; Fri, 02 Dec 2022 14:50:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GGe+iTwG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234923AbiLBWeC (ORCPT + 83 others); Fri, 2 Dec 2022 17:34:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234786AbiLBWdr (ORCPT ); Fri, 2 Dec 2022 17:33:47 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7811AECA1B; Fri, 2 Dec 2022 14:33:43 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id d20so8324568edn.0; Fri, 02 Dec 2022 14:33:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JJBRCJuPeD4sVOppZ4nKmrCrzkzn8rXvXzlwDq8fCmI=; b=GGe+iTwGyOOaFKNTDlCAjR6dKR8wb5gMcZ/dMjIhA46ZT6K3stZiPKFn9fWRmgFGb3 FLAJj/dwDbeywMhmpk36ITl9i7nP2/mPrUuzzQwlTfFwcWJkE0X9G0nJRyGa+DzvIkY1 pqBYLiaXsGTGJ1X+RcZnEmnYsyF5e4Nphz2CpKT1zcLyvGlAoqJEwBryRTiZDJDfccH2 wvbdTjZNf29D6bae/165/3v0hU39Xw6nlBi0y+wm/yD9Fl1lqKBNOJDMRZoa7L7vpB+5 lP/wMW2xkGOADRNqRu6nf0IiwYg+Cm1C0xqV5DdKnmpTxk3TP/gsdre3tfwJ67wCePai Q8pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JJBRCJuPeD4sVOppZ4nKmrCrzkzn8rXvXzlwDq8fCmI=; b=7/SOencGnXoZm2TI246WLw1Bg3vgNfzNZOR9XpYn405safYP48ssmqqE/nDZzlooS1 7xMBuzuj7ipNYDo4Zkaka+OTrkL0dLfO9deK2RIaA1NBYRl3YK2n29ngyXUOpbYzf0ar khWPAE9da0d5zTCnwlwe5g2cc6y5NCnnCAEWERoML9uZtJzWYjw48lw2bb+Oq/i0zrq0 j/QPw7Qdp6bL+4Zkzv3Bwq4bHN6frR+zBcNkFIYyq8OtHWTTmm3RCvgSMKJ10RE7a0Ug sv7hUvnaHx+nHwKISz3NnWEmzc0bY+u4AM4L+0gOaifHCqk2y7lXCfHiXRWn0OUJo3vP q1uA== X-Gm-Message-State: ANoB5plOLDXRPKlAkwkvEXsx3effW2+MwqOBESKDZJexeM8pMYGVgbsz fbfTawXzS3glPVrTroaWqFs= X-Received: by 2002:a05:6402:144f:b0:46b:51e5:832a with SMTP id d15-20020a056402144f00b0046b51e5832amr21328502edx.331.1670020423103; Fri, 02 Dec 2022 14:33:43 -0800 (PST) Received: from xws.localdomain ([37.120.217.162]) by smtp.gmail.com with ESMTPSA id j17-20020a17090623f100b007c0d0dad9c6sm575340ejg.108.2022.12.02.14.33.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 14:33:42 -0800 (PST) From: Maximilian Luz To: Hans de Goede Cc: Maximilian Luz , Mark Gross , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/9] platform/surface: aggregator_tabletsw: Use target-ID enum instead of hard-coding values Date: Fri, 2 Dec 2022 23:33:23 +0100 Message-Id: <20221202223327.690880-6-luzmaximilian@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221202223327.690880-1-luzmaximilian@gmail.com> References: <20221202223327.690880-1-luzmaximilian@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of hard-coding the target ID, use the respective enum ssam_ssh_tid value. Signed-off-by: Maximilian Luz --- drivers/platform/surface/surface_aggregator_tabletsw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/platform/surface/surface_aggregator_tabletsw.c b/drivers/platform/surface/surface_aggregator_tabletsw.c index 27d95a6a7851..bd8cd453c393 100644 --- a/drivers/platform/surface/surface_aggregator_tabletsw.c +++ b/drivers/platform/surface/surface_aggregator_tabletsw.c @@ -247,7 +247,7 @@ static bool ssam_kip_cover_state_is_tablet_mode(struct ssam_tablet_sw *sw, u32 s SSAM_DEFINE_SYNC_REQUEST_R(__ssam_kip_get_cover_state, u8, { .target_category = SSAM_SSH_TC_KIP, - .target_id = 0x01, + .target_id = SSAM_SSH_TID_SAM, .command_id = 0x1d, .instance_id = 0x00, }); @@ -371,7 +371,7 @@ static int ssam_pos_get_sources_list(struct ssam_tablet_sw *sw, struct ssam_sour int status; rqst.target_category = SSAM_SSH_TC_POS; - rqst.target_id = 0x01; + rqst.target_id = SSAM_SSH_TID_SAM; rqst.command_id = 0x01; rqst.instance_id = 0x00; rqst.flags = SSAM_REQUEST_HAS_RESPONSE; @@ -430,7 +430,7 @@ static int ssam_pos_get_source(struct ssam_tablet_sw *sw, u32 *source_id) SSAM_DEFINE_SYNC_REQUEST_WR(__ssam_pos_get_posture_for_source, __le32, __le32, { .target_category = SSAM_SSH_TC_POS, - .target_id = 0x01, + .target_id = SSAM_SSH_TID_SAM, .command_id = 0x02, .instance_id = 0x00, }); -- 2.38.1