Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2368335ybv; Mon, 24 Feb 2020 04:05:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzFEy5FW8kGJc5sfX9FIuoEg7YjdbMHYUgxeZVfLQv9Skb3lLliHLsSjGET8kFlAR5wrIn+ X-Received: by 2002:a9d:6a4f:: with SMTP id h15mr39669632otn.86.1582545949470; Mon, 24 Feb 2020 04:05:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582545949; cv=none; d=google.com; s=arc-20160816; b=0Iy4Vha63XnuCtuyPPXAWjHmm8LOaLHgLj/HZpeduY907tYrGOIh6w9EBrcmVP2bJy Qp1Q9bz7jOQ9WsNfMd0kXmZnFoaEU0vFZnyyXh8dLppJPhzDIYsRNuzI8Bv0Ujc26qWu hgH4MomfR/ygAGsWbbSnf9jvHy0vtJgHLyhKxfyT9xg1MWqEBXYhfcZXTuYKEhcAJaP1 Fs7E022PixDnBd3Xj9s6F3JF1nAsf/CQ+p1diJMTOp/krSbNea1Wb5ZqreC30DsGRELz cTECr022o4u1LDGfZYvRCbDuj6QhGyRe4Q5GcDHI+ecr/3CTwIYZ6/KCpeQK4+zQgl8j E3vQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jwaRxkCqwkn2BErj8QBkO8XBW4wS1Sprtn/HtPbIgBw=; b=ULR9tn/Aal+PVEnHUQBdpfVSLSPSm1zUXubr+I/F7tscx4gNhuO0UtzSDelBLJo7Tb Opvbhxz7lFnpA3GjVo1XIHA8Q7RtMW3wHdIsiKWUlEkBNV6uNXESXke4Ui1gQAQ4iZvA W3d6oyT53bRj1We/jERfcuMptuqU0X5yI0MLVNFMDY+oX0dM7WmxRubzpp4dy9nqfB+D DlrEh1262k3SU57jJclPZzCz18tcEB/hu8dW6vFxFKvkhRXo9tLYmttlIvUkU4rFK1oA B6ENQKz/q7Ra+/bEt05pdw585peY3XCFxRpecnOqIyEOyapEXyBjD4yGT9IjimURTz3/ qVYg== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g98si6549556otg.4.2020.02.24.04.05.32; Mon, 24 Feb 2020 04:05:49 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727487AbgBXMFP (ORCPT + 99 others); Mon, 24 Feb 2020 07:05:15 -0500 Received: from foss.arm.com ([217.140.110.172]:36098 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727290AbgBXMFO (ORCPT ); Mon, 24 Feb 2020 07:05:14 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4F2D630E; Mon, 24 Feb 2020 04:05:14 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C8D533F534; Mon, 24 Feb 2020 04:05:13 -0800 (PST) Date: Mon, 24 Feb 2020 12:05:12 +0000 From: Mark Brown To: Andreas Kemnade Cc: hns@goldelico.com, j.neuschaefer@gmx.net, contact@paulk.fr, GNUtoo@cyberdimension.org, josua.mayer@jm0.eu, lgirdwood@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] regulator: core: fix handling negative voltages e.g. in EPD PMICs Message-ID: <20200224120512.GG6215@sirena.org.uk> References: <20200223153502.15306-1-andreas@kemnade.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="V32M1hWVjliPHW+c" Content-Disposition: inline In-Reply-To: <20200223153502.15306-1-andreas@kemnade.info> X-Cookie: How you look depends on where you go. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --V32M1hWVjliPHW+c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Feb 23, 2020 at 04:35:01PM +0100, Andreas Kemnade wrote: > An alternative would be to handle voltages as absolute values. > There are probably no regulators with support both negative > and positive output. This is what'd be needed, your approach here is a bit of a hack and leaves some values unrepresentable if they overlap with errnos which obviously has issues if someone has a need for those values. Ground is to a large extent somewhat arbatrary anyway and some systems do just redefine it as part of their normal operation (eg, VMID based audio systems) so this wouldn't be a huge departure. --V32M1hWVjliPHW+c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl5Tu/cACgkQJNaLcl1U h9BL5Af/WPTDV2LiQ0EfvbEoe69ncxjQzpbExi/NqE3yTTUvNpsBOcy2Ydt6UKpG VH1g+nGRFmHX4lBVbjgR22QZNPyd385zViCuO0Rj9XWMYEvqt7lFwEVdTObPbF2s AlW9CrwEJ5kUGYeTF2MXejPyDricVcrTke8YNK7RyZr/UWa9OuG7z9bOi298Pspr 859CJgZCeCPlu4LYuW2U7dtHEZiDxsmU2GNFkR8MwROUuApvz6x968a/r8E7lHD6 Ds9HBFcJ8UJk28gIMSi8oYMZ6/AvEKskc2vipKVcuG1Go4dDVxT/4lgTwfRNbCmU Sa7dUBnOnMpA+CqR0PaUsQdowrW8wQ== =Eqzw -----END PGP SIGNATURE----- --V32M1hWVjliPHW+c--