Received: by 10.213.65.16 with SMTP id m16csp251437imf; Mon, 12 Mar 2018 02:30:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELvxqcqB0xzf8qhvf6R3SpxLHhhiv5wkLEQhZhEbsXxa+bpv8DBU4fUD5BxFHQl2iU0Lq6WJ X-Received: by 10.99.173.79 with SMTP id y15mr6061399pgo.136.1520847017871; Mon, 12 Mar 2018 02:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520847017; cv=none; d=google.com; s=arc-20160816; b=qAtG+IYyquJW6frUIlH4WUfMDDCqhp3kHq8JO/uAeN69nT1yWeeBM6Ydz8Tfh0qqYP DsOzb/waI7OWBgoYxJq+0PqJrAKrEW+18uOwAFSWtrqYr3hDUCMh1B48Niq6HxRuHnTs b7RREzUMdUoT4xSwcTZRpuA8VsUxV8+/9EYTvwmxeirF4kERzDZNv3db0UTLwcDyGNjs 7xWkwB+ACxoAyN+OKpbmJ7XPwQzxQWY+NlgqVMi/AUCZPRXkzK0EXdRt98EgfZQNmv9z tm5AEniOEywb13lJKvxxIHKtPpcQhlHPnYPZvIbWo9JCsxnPKrhF5dsj9MV25iou0MjU C0SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=Ma0Snub3IX48SUKS3f5olp0/NogZf2X8kQWpMvtBH0U=; b=UJpnDL/ripDBBq19zcnMxYFavfH9YcIeF7EBO/oyWNNRJdDGhowcfaV+xkoOYqH3EW FyJpiiyXkShErp8FZK08/xuxfV4Xfuk5X/TOSZmGMiKv6iR/CWpenUEExrH4qjrYZamH rdMe0G2NVkruloXQbGemykwpr+bD45t6XBg2pIsDMQ1y9ow+fEy3nU4oNk2xErpcUtNd WruSxp3miEM5zKwC94AtsgNHjSspHC6O6BS1tVLzptxEgx9H7C+Q+ssPviyapvc3/Xal 7DncujgqOSxR3j77COP2zFvCSsSrsu27GnSsd2objC8sgeb6Vi1KI5JJmVnPXUX/KIyY WvVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vU8E5dvx; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si5936835plk.632.2018.03.12.02.30.03; Mon, 12 Mar 2018 02:30:17 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=vU8E5dvx; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752309AbeCLJ14 (ORCPT + 99 others); Mon, 12 Mar 2018 05:27:56 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:46137 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbeCLJ1y (ORCPT ); Mon, 12 Mar 2018 05:27:54 -0400 Received: by mail-wr0-f180.google.com with SMTP id m12so14877501wrm.13; Mon, 12 Mar 2018 02:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Ma0Snub3IX48SUKS3f5olp0/NogZf2X8kQWpMvtBH0U=; b=vU8E5dvxExDTZpupaZf7xTi9zYVPx5PCL6q34CZVBqaqooqYqmzxjKeocvV3Qy1NAI xjZ9QF01AQh4HC+7H32fOY2AiZ1MK9bC8yfwCm9JnqcqA3Lo5k528X15RTxoGXpzZ81e sGjsQlyzQ3efV3jFGfqgl77jAjSSqO/BizLoEFY2FB4L2CJnXep0idhmfqw+GpxzWhul m/1QwjF95lkDMFgFxCPJE+1V1HJtEpavpNFZ8HapnQiYrPkrI6WtiewJtaDlwYXbdDJK inZQBQ4uD8Qh8ywGYlxqOzDJ1ei6fn2jQH7y+9K1bpRFewbo5rTCVSVuVspJdQg+9JtZ gCbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Ma0Snub3IX48SUKS3f5olp0/NogZf2X8kQWpMvtBH0U=; b=ZIVq8YOcvdUwxindA3BT7CegDoVw1KRGP4Ujwum0zyTCk+uxYhRfTiR8RwgXjJegXa TXvlD5AP9NEEvSCOTR7WH5giIcuenkiVG9KhdYp8LlmV5f60SzlfYLFN1P7CvqAbxZza pgCrC9u0XLuJVgxsKQqaROE1gQ/bkDxNCiNY5cs6XshX8pyVJ00Y6mrgTmYWzJ4vNm/v Ks7kaoWK6cQkbshSxxvEMjTdTncWEIbd3vpyuDRSn30VlBMzzS1KuJE0N99I+FneYbbn yOCv/O4exTovaRtUx3F5sARp20hfiAphJYzxvAmm/4Mftgmh2mDBMj9fhkj7y+wrc2nO d8Tw== X-Gm-Message-State: AElRT7EUAOp++VEpmXtjXSQUdUw5DzGVGovAGiJIHBirBNQ4xQE6jwmr kamAUzIiP7lODpKQyLv4Xfxor+tgafUDv4prcYxXrw== X-Received: by 10.223.179.194 with SMTP id x2mr5942064wrd.94.1520846873213; Mon, 12 Mar 2018 02:27:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.157.129 with HTTP; Mon, 12 Mar 2018 02:27:52 -0700 (PDT) In-Reply-To: <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> <20180310201033.GA1173@kmp-mobile.hq.kempniu.pl> From: Andy Shevchenko Date: Mon, 12 Mar 2018 11:27:52 +0200 Message-ID: Subject: Re: [PATCH 1/7] platform/x86: fujitsu-laptop: Define constants for FUNC operations To: =?UTF-8?B?TWljaGHFgiBLxJlwaWXFhA==?= Cc: Darren Hart , Jonathan Woithe , Andy Shevchenko , Platform Driver , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 10, 2018 at 10:10 PM, Micha=C5=82 K=C4=99pie=C5=84 wrote: >> > #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). Interesting. Does it mean there is no logic between functions on the same platform and what they are expose? May be those sets might be groupped by what kind of functions expose them? > 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? If no other way is feasible right now, the above is okay to me. --=20 With Best Regards, Andy Shevchenko