From owner-freebsd-arm@freebsd.org Sun Aug 16 13:02:27 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F6253BB1FF for ; Sun, 16 Aug 2020 13:02:27 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4BTy4y6zXFz4KvL for ; Sun, 16 Aug 2020 13:02:26 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: by mailman.nyi.freebsd.org (Postfix) id EF8833BB1FE; Sun, 16 Aug 2020 13:02:26 +0000 (UTC) Delivered-To: arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF5283BB462 for ; Sun, 16 Aug 2020 13:02:26 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BTy4w5SYhz4LDJ for ; Sun, 16 Aug 2020 13:02:24 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1597582937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yQlXk31XPyxyDmNc+4YYhH4+MGi+QHtKq9d71vl3RnI=; b=B7cT1ww3uSIxDARH6saYfL1KAbP1je3WprK8Jf8St2FM5gh8h0dEyKxDDcppdd2gHvPZPn 60Sg9+kpOePkPhoJ50f78gUxXLZJF+Etya4iLaGzAZFDlrih6sN2sU0+77Gjnilkfv5c0c Xd2WVLM34+Z3MMFD7b31HBUtlVffDrU= Received: from amy (feu30-1-82-242-59-241.fbx.proxad.net [82.242.59.241]) by mx.blih.net (OpenSMTPD) with ESMTPSA id a102d2c8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 16 Aug 2020 13:02:17 +0000 (UTC) Date: Sun, 16 Aug 2020 15:02:17 +0200 From: Emmanuel Vadot To: =?ISO-8859-1?Q?S=F8ren?= Schmidt Cc: "freebsd-arm@freebsd.org" Subject: Re: Pinebook Pro battery fuel-gauge driver.. Message-Id: <20200816150217.b976cb1f516f7f09b7f35c10@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1597582946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yQlXk31XPyxyDmNc+4YYhH4+MGi+QHtKq9d71vl3RnI=; b=qfYH6NHEcTbpdB9b3TdEzuOPfkW9rmBrDyOSPqUMlgsWNvfugPsBFqGZd585tZDDH6DytC z/XhYewQ49JZkC0eZIjc/6BcJy5Wk0VHVSgBECXSOil38tlVC2WdEGVRlSdxFjGTdN7hNP TszMDrDnVEN7fZrFkOWttLOJKeA4FezyHXnCgg6HuFBQAOip5FlvPaR/TJ7jBpWJ2+RNrB ddBnqSVdUSQmV1LLq1gxRH9fkPHnSd1drBbuJMcARJavzBXeQW8uoCgKLrMM99sTHmqUOp h0BX5vwIUlSbV6a+sw9FRXB73xPGozHGynonftuKkXLhqqsoYE7QGGUQc3sRlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1597582946; a=rsa-sha256; cv=none; b=ULn/ENtU5/6R3m+9OvUE2jhXCqbjxbQIDSpEDeZmwHgHbn57nF+cExS9g8qLCWvUVupszc j3VIMeTuYXdBe0lQCV7G3NAhisgTMT4wVONOxBBvFaUSbzvONpc8yG4jeUh8RSrjwqYTxm 1G6NyaOK+BsSovVqkei2TYw2evvjfBn9sSlRZukeOK9OqlO897BPyKbi+LZXmPnVxha8Gh d6lmtcV5Ux5A+DDhU6Qz+bbV2tPwy4A4iNkuYKyK3TPWUZ0K9BGZlO7uGojzxAt5jO7xgh CpmGyAPDUVI2e0ZhPCQyjSznJ1WBweJrSl6mfjSkrjO07qT4NcsEgTjvLlAycg== ARC-Authentication-Results: i=1; mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=B7cT1ww3; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Rspamd-Queue-Id: 4BTy4w5SYhz4LDJ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=B7cT1ww3; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-3.55 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; MV_CASE(0.50)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; ARC_SIGNED(0.00)[i=1]; NEURAL_HAM_LONG(-0.99)[-0.985]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-1.04)[-1.036]; NEURAL_HAM_MEDIUM(-1.03)[-1.033]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Aug 2020 13:02:27 -0000 On Fri, 14 Aug 2020 18:23:33 +0200 S=F8ren Schmidt wrote: > Hi >=20 > Now that we have display and all working=20 I wouldn't say that, what you have is an hack that will probably cause other problem. > I hacked up a driver for the cw2015 chip that can tell how much battery i= s left so I know when to seek an outlet :) >=20 > It consists of a patch to the dts (from linux) where all I need is the ch= iplocation but for compats sake, and the driver. Cool, got any link for your code ? Mind to open a review ? > Access is via sysctl, as we have no real way of handling this info on ARM= (no acpi, apm etc) AFAIK. thj@ started to split battery subsystem from ACPI a while ago iirc. > Enjoy! >=20 >=20 >=20 > -- > S=F8ren Schmidt > sos@deepcore.dk / sos@freebsd.org > "So much code to hack, so little time" >=20 >=20 >=20 > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" --=20 Emmanuel Vadot