Received: by 10.223.185.111 with SMTP id b44csp34041wrg; Fri, 9 Mar 2018 00:15:33 -0800 (PST) X-Google-Smtp-Source: AG47ELsQowSe9adU6484K3mrr6k7X/2KuSuqk4+nZ16zab11dGUg1S2DS4UcsTSnu0rRB5VbaAOD X-Received: by 2002:a17:902:b416:: with SMTP id x22-v6mr26503031plr.279.1520583332983; Fri, 09 Mar 2018 00:15:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520583332; cv=none; d=google.com; s=arc-20160816; b=0MCmt2kZB3W3yNgALIm95Fqs34pfGegSABMq+gvlMvpk1y6AIt/fawdJ2mQXrxV0cm 4aoy3x6NutQShov/Ic8QkGhq4usX14QWZhEZwgQCyb6jP/g18C1KqDmv5s62PPmnMsr9 NktxZ95Tn7blom1A/M/Slch6YW0zC2iCU3s05TcWaIc2E3CNbDrkYTnb1ioQoaLkqFTo ZPEIX8tVdaKAFiiUY9G7dDfwDZSWmVSDFv5mkXc3X7RRFIt6jW/Losas8jrl1fLsQ4NX HsJLWsZrGV09NCHwZwSe5G+hScwjfXxc9gfOgoCifvj/Mgz3+gxvbae2e6O9tqYdD/gA TBQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=xOGlbad4bLOQdMolE/4ZmtYzl4ObaDy/Mo3Jy3x/Kzo=; b=i2k3+b2rIYi7JsubhJJtU9A/gELn23/+sTklNMUoBE9PJ5IFkBVp7+lYPDYeQge8vi 38DwfrUsRct9iCe5jpdxtyDCAPowHYliOqpWV/jC456D+j7Id2YoPTH2NIKEuQOsZdQJ Ay39BggF2yHi+nydV8CEH5hmjFMTic/hrVLuK5brmYcT2PmDb5YFdsCJa+a3TWSgup+o nI31q5VHf+2Kf2fO1yFZy2EFcmA5f+xftZEYhSLDCGjGHa+S8/Z10pWAFw0M1CwF98TE OrvDCo20G41aSXvsz6Q5UayQqYtlGdHxWE6nnDiJ7doxk5WaGUQ4q0ZGR1SANJs1j7DB usfw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m133si403289pga.483.2018.03.09.00.15.17; Fri, 09 Mar 2018 00:15:32 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751965AbeCIION (ORCPT + 99 others); Fri, 9 Mar 2018 03:14:13 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:38390 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751679AbeCIIOL (ORCPT ); Fri, 9 Mar 2018 03:14:11 -0500 Received: from mail-pf0-f199.google.com ([209.85.192.199]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1euDAI-0008Vg-GU for linux-kernel@vger.kernel.org; Fri, 09 Mar 2018 08:14:10 +0000 Received: by mail-pf0-f199.google.com with SMTP id x6so1290063pfx.16 for ; Fri, 09 Mar 2018 00:14:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=xOGlbad4bLOQdMolE/4ZmtYzl4ObaDy/Mo3Jy3x/Kzo=; b=Bso/ze5b9hTVEbHLn9rcYs6NA+luJU0mkOdhjNNkCcOr70YGwpN3QHOdEBHCcbqLmk +RRQFIcNnHhDk462Z34Ujfd2qkt8DjQ//q60V61GcznwSIT28ROE5i8YDbi/eQbBT9/8 YVpgCgsKwSP74+S+aj7zIqQCAljyw1d0bkSLF3ssze000nFUmzq649l5NkRXpH+JWoXL gpiX6jBnseKwifP0QqxZgPoe8cS3xur1u6p+g7cUpDd0pBjgfXL+7wjJfkiqCq17C3Rk 84ny6nszg/AkdqkEfNi23uVv0gyeEj0PjZRWuE1ECJiCRxLdp0nQmgR0KCdQW+nhldgW YAAg== X-Gm-Message-State: APf1xPCWKt7r38W6CtGNLXnnT7/nSdyA5TSHM7spAupvu5QxnwanDwUi nj2GHLRDepW6Ejr98+KJnzlRCgQsS2zKtzZgMbPXiVsFEpY8rWkSXPh1qh9EZK/GH6+VyyyvPcO 2rNlOlRS56SABBTjUDUVdph1/4Ky/UBVAIIqJ22T7Uw== X-Received: by 2002:a17:902:8b85:: with SMTP id ay5-v6mr27370907plb.329.1520583249242; Fri, 09 Mar 2018 00:14:09 -0800 (PST) X-Received: by 2002:a17:902:8b85:: with SMTP id ay5-v6mr27370885plb.329.1520583248924; Fri, 09 Mar 2018 00:14:08 -0800 (PST) Received: from [10.101.46.95] ([175.41.48.77]) by smtp.gmail.com with ESMTPSA id d186sm1741572pfd.1.2018.03.09.00.14.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 00:14:08 -0800 (PST) Content-Type: text/plain; charset=utf-8; delsp=yes; format=flowed Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.15\)) Subject: Re: [PATCH v2 2/3] platform/x86: dell-*: Add interface for switchable graphics status query From: Kai Heng Feng In-Reply-To: <20180308163837.myfmnowz5ogto52w@pali> Date: Fri, 9 Mar 2018 16:14:03 +0800 Cc: mjg59@srcf.ucam.org, dvhart@infradead.org, andy@infradead.org, Mario Limonciello , tiwai@suse.com, platform-driver-x86@vger.kernel.org, Linux Kernel Mailing List , alsa-devel@alsa-project.org Content-Transfer-Encoding: 8bit Message-Id: References: <20180308091023.9061-1-kai.heng.feng@canonical.com> <20180308091023.9061-2-kai.heng.feng@canonical.com> <20180308163837.myfmnowz5ogto52w@pali> To: =?utf-8?Q?Pali_Roh=C3=A1r?= X-Mailer: Apple Mail (2.3445.6.15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mar 9, 2018, at 12:38 AM, Pali Rohár wrote: > > On Thursday 08 March 2018 17:10:22 Kai-Heng Feng wrote: >> +int dell_switchable_gfx_enabled(bool *enabled); > > What about following API? > > bool dell_switchable_gfx_is_enabled(void); > > Are you really interested in errors? Then what about? Not really. We can assume it's false when there's any error. I'll update the function in next version, thanks! Kai-Heng > > int dell_switchable_gfx_is_enabled(void); > > with e.g. > < 0 - error > = 0 - disabled >> 0 - enabled > > -- > Pali Rohár > pali.rohar@gmail.com