From patchwork Fri Oct 5 18:41:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10628659 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6CCDC14BD for ; Fri, 5 Oct 2018 18:41:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FB9E29BD4 for ; Fri, 5 Oct 2018 18:41:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CD4A29C0B; Fri, 5 Oct 2018 18:41:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D0A229BF9 for ; Fri, 5 Oct 2018 18:41:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728381AbeJFBlQ (ORCPT ); Fri, 5 Oct 2018 21:41:16 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:37272 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728139AbeJFBlQ (ORCPT ); Fri, 5 Oct 2018 21:41:16 -0400 Received: by mail-pf1-f196.google.com with SMTP id j23-v6so5477357pfi.4 for ; Fri, 05 Oct 2018 11:41:18 -0700 (PDT) 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=zBFAJVedcraxDMXVn/3gw/J45rh9ivZ5tlGTOiBAaas=; b=J24Sdp/8HLW6DZQ1te231tY9waFa4Vni0utnDO7Rf+ZalmiGGe7gOqSARfeO0Fc1qT c6sYOUsiKGpUqJxUJjSWHiHzelixt7Sm/3koywEf55A4TRvmnL+S61FI7ceFjebjGbti l6j2ju01DWfjEQDvdtGFkgdJxmVDYy6CN9yb8= 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=zBFAJVedcraxDMXVn/3gw/J45rh9ivZ5tlGTOiBAaas=; b=M7wVBPo1wDX4IUUVrTM51LMHxAXdCUZPUuGFvsBh8yhklg09smYeCJ4j/pZO5OhDd4 SbYEOgEMIPgG28qXCNek2k33+9fmH2R0T2D+G53azaD3aLCKtlykvDGWyvYSLMQxEDAY 1MlIXRanBI25yYUR/L8ySr9oElunuNKEXAZmrDjEvuq8ko4CAQmhwj0K9IWD32rz7V0p wpJSnLK5JMbMyhdYaih195hWxPaPLdf3VwcA3UZv9QW0ZbELJ8rVea1nCM4NJ+t45AsG HjMxXHVYY9gy9LbTEcJWRwmwK909bOJEuoyl9ak78rXlzcd7cv7qyimKOdtzztYth89H QJsQ== X-Gm-Message-State: ABuFfoiBHi0k3NsO6yOd6qqFuuxNRPe1ZboCMhyG/rpQBnX2xT9zkLu7 8etkE6NbS/lcR7UnwRAiZVM40l9dqSI= X-Google-Smtp-Source: ACcGV61Q1xT3v874i+rYLgSompScJduwDiqEkVDu+h0B2mksz9CtYyQO/ZCkdUIpxAGwt0myObVnmQ== X-Received: by 2002:a62:ac15:: with SMTP id v21-v6mr13252355pfe.126.1538764878568; Fri, 05 Oct 2018 11:41:18 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id t64-v6sm12151303pfb.44.2018.10.05.11.41.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 11:41:17 -0700 (PDT) From: Dmitry Torokhov To: Jiri Kosina , Lee Jones Cc: Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Boichat Subject: [PATCH v2 1/2] mfd: cros: add "base attached" MKBP switch definition Date: Fri, 5 Oct 2018 11:41:13 -0700 Message-Id: <20181005184114.207503-1-dtor@chromium.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds a "base attached" switch definition to the MKBP protocol that is used by Whiskers driver to properly determine device state (clamshell vs tablet mode). Signed-off-by: Dmitry Torokhov Acked-by: Lee Jones --- v2 changes: None Lee, I was wondering if it would be OK for cros_ec_commands.h to be merged through HID tree. include/linux/mfd/cros_ec_commands.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h index 20ee71f10865..5fd0e429f472 100644 --- a/include/linux/mfd/cros_ec_commands.h +++ b/include/linux/mfd/cros_ec_commands.h @@ -2132,6 +2132,7 @@ struct ec_response_get_next_event_v1 { /* Switches */ #define EC_MKBP_LID_OPEN 0 #define EC_MKBP_TABLET_MODE 1 +#define EC_MKBP_BASE_ATTACHED 2 /*****************************************************************************/ /* Temperature sensor commands */