Received: by 10.192.245.15 with SMTP id i15csp915616imn; Sat, 10 Mar 2018 12:14:43 -0800 (PST) X-Google-Smtp-Source: AG47ELuHSPzrKNYphFirK7ILdzZq2idKYW7eHaPNmbhuIgLeMes7vQp3sAmlTlliRgzWrQFY9FVs X-Received: by 10.101.81.76 with SMTP id g12mr2421817pgq.88.1520712883848; Sat, 10 Mar 2018 12:14:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520712883; cv=none; d=google.com; s=arc-20160816; b=RnJyykDFeadMFR2dxY9nmRWtmeJNTqSXpGIYKh8zDBdeGo+1Be3DxaEP3diTD0S4bG 3PRb7RRjvokp6TY1+kk8eBmm7Ln+cCAWNktqco1nNuF2VM5AOpj66n9pSTs4/PA1BtFH 7UbqtVHY8FaLdzqrcFWrwn+O0MW4glVB9M4PWYDSJKt+T5xOciczzFzjSi42jRBn1ey4 LeDXXwVcH67g+gche5/locAx0jrsXXDs3X+UZYQMI3lt940iYy6DQzSl8cNNOWs/xJ2l so2Ky3/hVpDQcTg6ou+OLpIdwVXpXu+nG2MFkpfc8UYGEqM/vvsYOs8R1DOH/HBGJ+qh AN2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=JFt+CQyFoLokRrXIorP9j5e7MUT5G3rGD692cZpg7N8=; b=Sx3PTxxUASCqaPfykru3SMDVbUKv9moOhTfEvLjyYf1+pEWMaOAEgX4A+Qg7mh4uNT jT3KwNNLOpLmlR/e3BXSq54sJZLkvLm8S8qQ2ZLb/Tssmr4WVzNbKHDaoaoq9vOdJlOh XagtYmxTxHssbatxUUQqKaTIFS/prgF9B+J2rrjoNsq09cdQZFAtbMA0G/AnzBzAwjkY PWXFcEwRXvjKC94/nOHT/JhXcKVdHka2FZSomqoFXfbHv+bpxpefqMIKUTv9rqqGmA+0 zKmWE71OmBo9aKz0JzChV0E/hqAh36uHSTtuQXm9gEEhSExYxZ+efECvbz78WaTmEU/3 Ypxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kempniu.pl header.s=google header.b=sVcFlRo3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kempniu.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e87si3180739pfk.322.2018.03.10.12.13.37; Sat, 10 Mar 2018 12:14:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kempniu.pl header.s=google header.b=sVcFlRo3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kempniu.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751229AbeCJUKk (ORCPT + 99 others); Sat, 10 Mar 2018 15:10:40 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:33228 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751043AbeCJUKi (ORCPT ); Sat, 10 Mar 2018 15:10:38 -0500 Received: by mail-lf0-f50.google.com with SMTP id o145-v6so17786220lff.0 for ; Sat, 10 Mar 2018 12:10:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kempniu.pl; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=JFt+CQyFoLokRrXIorP9j5e7MUT5G3rGD692cZpg7N8=; b=sVcFlRo3pTSeKWYk9ucL6ZuOKY73Q57Dz2ewt4o9QAIKFOeNvDy/kqHQmP+M8Q7f2e aw2MuR0uNPHdxSMmoUyOqFF7P/50STcLyr0+z9XYHZ7+wmBApzYcFpwkYghcUenmVwhg CYpgC9jpGpUsEFvF0XYvrbVB0CMN9x+5KBdf4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=JFt+CQyFoLokRrXIorP9j5e7MUT5G3rGD692cZpg7N8=; b=pq415mlu8nHF7cowi0sQkuAVKeLUUAZMGFg/AWOSz3opn5xEcSISiXg47m80f6+6c0 Hpj42rKDSmqs4FJE3fbxwLaBaj5ocV11bWgzQ9cghBddQWMJyRe+jTrwPf4LdfLHHUnq YKIZ2Zgt0zQ2GJHjbiLRX3EedK5fLE4dVfP036xSl8jtj2LWWvlJR3ZAoVnlK4twDxkz gPcT2sI006sBMp4E6SM6jfj8j00ipKepdCja9EGaXkh3ikSk0GW/2YhyM+lfLebWBsTf QQVeCmJG8mC2WB3y6GEgzb2nPPt3P2pJ6kuGMe+Qodc2bck4aTeJfPnAUPZea0zxUws+ 3WAQ== X-Gm-Message-State: AElRT7HdM+hYEJSMg4HSLVJCo7uXptDtQoyZT9BEpgQMnpZkG6JOFqHN kcv4Rbl7e9MTzI4zFakCIHVatg== X-Received: by 2002:a19:2b88:: with SMTP id r130-v6mr1763514lfr.48.1520712636901; Sat, 10 Mar 2018 12:10:36 -0800 (PST) Received: from kmp-mobile.hq.kempniu.pl (kmp-mobile.hq.kempniu.pl. [2001:470:64df:111::d0d7]) by smtp.gmail.com with ESMTPSA id k12-v6sm911336lfe.93.2018.03.10.12.10.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Mar 2018 12:10:36 -0800 (PST) Date: Sat, 10 Mar 2018 21:10:33 +0100 From: =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= To: Andy Shevchenko Cc: Darren Hart , Jonathan Woithe , Andy Shevchenko , Platform Driver , Linux Kernel Mailing List Subject: Re: [PATCH 1/7] platform/x86: fujitsu-laptop: Define constants for FUNC operations Message-ID: <20180310201033.GA1173@kmp-mobile.hq.kempniu.pl> References: <20180227211539.5708-1-kernel@kempniu.pl> <20180227211539.5708-2-kernel@kempniu.pl> <20180304050813.GA3129@marvin.atrad.com.au> <20180304194426.GA1428@kmp-mobile.hq.kempniu.pl> <20180305231650.GA25693@fury> <20180306205920.GA786@kmp-mobile.hq.kempniu.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > #define OP_GET_CAPS 0x0 > > #define OP_GET_EVENTS 0x1 > > #define OP_SET 0x1 > > #define OP_GET 0x2 > > #define OP_GET_EXT 0x4 > > #define OP_SET_EXT 0x5 > > This one looks pretty much okay (logical pairs IIUC). Sadly, no, these are not logical pairs. But maybe this is a reasonable compromise anyway: - OP_GET_CAPS seems to be consistent between different functions; it is an operation which returns a bitfield describing given model's "capabilities" in a certain area (LEDs, buttons, etc.), - some functions expose only OP_GET_CAPS, OP_SET, and OP_GET, - some functions expose only OP_GET_CAPS and OP_GET_EVENTS, - some function expose OP_GET_CAPS, OP_GET_EVENTS, OP_GET_EXT and OP_SET_EXT (but not OP_SET or OP_GET, probably because 0x1 is already "taken" by OP_GET_EVENTS). So, given the above, does this layout look reasonable to you (at least somewhat) or would you rather see these constants shuffled around in some other way? -- Best regards, Michał Kępień