From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A7AEC433EF for ; Fri, 11 Feb 2022 15:43:24 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JwHvZ303Pz2xb1 for ; Sat, 12 Feb 2022 02:43:22 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=qovH8WZG; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::c32; helo=mail-oo1-xc32.google.com; envelope-from=proclivis@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=qovH8WZG; dkim-atps=neutral Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JwHtr6Tpmz2x9R for ; Sat, 12 Feb 2022 02:42:42 +1100 (AEDT) Received: by mail-oo1-xc32.google.com with SMTP id c7-20020a4ad207000000b002e7ab4185d2so10746710oos.6 for ; Fri, 11 Feb 2022 07:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=DdwtRxttqlCc5SWbIW/H4agXUpPyMJ6mPKkMf7k7lgg=; b=qovH8WZGtIK75b3lAg1sapIE+yjtFWEVEp8JGXFMXaproj3g/XtKlMSxylJapTJe++ UUx+A/Gt2R/8QSKRLR9F2CrPYaKCrhFgFZBi9qrVp8i5EjcRWktnCiZf6SrN60rmOuRS eutCPAaVi6sS/PBGAqmLLUEjJnQRGHkjsh2axTUkpf7vrv2nePaIDDRLYt3HMAZnWGa+ enbfaIXSyq7tb8aygA2YRYEC8UIjUz2ItsRh/1HFoK4HcJx/9srYDX93FmNa8yFMCLs4 7L6NlgqDmOUBgB3+mkL1zDI6cNQavtN7vOg7Ob1cuPcrcYx5TM+pzg6qlmWoeYeKP75r Z12A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=DdwtRxttqlCc5SWbIW/H4agXUpPyMJ6mPKkMf7k7lgg=; b=5beu69jQipRNwTDlVVIzZpR7A5WME6LM5luR3lz2/GVlLTjqp0Uvhu7ygX+/q673GM pIshCPXJQX6metpWLs7X2paj8W+YqPayQWW4yjtuBTSnTKnnM3BEqiBMRY3p8i/svN8M XkXQnYwSJ6hEgPqv1OCVP3HwB77LUY77TZQ7JjrtRObQU4U3WPhaGWou3yMmTq7VFgi/ 2QTFaTVeLMz42mooZrWJQ3kgmK8OriSyfLPQBPilmrZiFnQAH9NgVY28hkajdgdpxCfw V3hRsGHG1BJSfrujsqGueEACqZCQ6NPHKr7lNlEp11e2yYwxdz/IGlvT+V6VRrrGzq6A legg== X-Gm-Message-State: AOAM533b+cmgWhQV3THgkY58ZfAv0iaP8SXa3IfjOPZM89IL8IUiFBDX T21BX4CvDEhTpDzQaBi/DcX/ViX2jQMfPA== X-Google-Smtp-Source: ABdhPJw49WHheG2Ei15P6lJXwEBtpWQXUk04IWydxdX7MZtkaE3GcQWrh7wWCcBQ2TQdV5f3D0ktEg== X-Received: by 2002:a05:6870:4513:: with SMTP id e19mr364582oao.328.1644594159578; Fri, 11 Feb 2022 07:42:39 -0800 (PST) Received: from smtpclient.apple ([37.19.221.33]) by smtp.gmail.com with ESMTPSA id bh7sm6116339oib.6.2022.02.11.07.42.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Feb 2022 07:42:39 -0800 (PST) From: Mike Jones Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_5A15258E-FB50-4A32-9F1E-280B7D0FFD0E" Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: No dbus objects for phosphor-regulators Date: Fri, 11 Feb 2022 08:42:37 -0700 In-Reply-To: <1858988f-100f-b3b4-c599-80cddaa7247a@linux.ibm.com> To: Shawn McCarney References: <9aaceaed-1a8a-6a13-d650-8f4678d267d4@linux.ibm.com> <6D1561E1-59FC-4126-9271-A7C8BFDB0B11@gmail.com> <1858988f-100f-b3b4-c599-80cddaa7247a@linux.ibm.com> X-Mailer: Apple Mail (2.3693.40.0.1.81) X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: OpenBMC Maillist Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" --Apple-Mail=_5A15258E-FB50-4A32-9F1E-280B7D0FFD0E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Shawn, I was mainly surprised because a conversation I had with Guenter, if I = remember correctly, suggested that /dev/i2c calls from user space work = with hwmon, because hwmon does not lock the i2c except when using it. So I assumed that in this case, it was the polling of hwmon that was = just keeping it locked enough to conflict with phosphor-regulators and = then it gives up. I could just not use hwmon at all use phosphor-regulators for all = telemetry, but this seemed like more work. Also, I will need to figure out how to connect phosphor-regulators = telemetry to Redfish and the WebUI. Are there examples of how to do = that? Mike > On Feb 11, 2022, at 8:32 AM, Shawn McCarney = wrote: >=20 > On 2/9/2022 4:30 PM, Mike Jones wrote: >> The journal shows an I2C error: Device or resource busy. >>=20 >> Does hwmon lock out phosphor-regulators if it uses the same address? >>=20 > phosphor-regulators currently communicates directly with voltage = regulators using i2c-dev; it does not use device drivers. >=20 > The reason is that most regulator drivers provide either no or very = limited ability to configure regulators. For the systems I work on, we = need to do extensive regulator configuration to fine tune things (output = voltage, pgood min/max, timing, etc.) Redundant phase fault detection = is also pretty device-specific and on involves communicating with = multiple devices. >=20 > I have not tested using phosphor-regulators when a driver is bound to = the regulator, but I suspect you may be right. I assume hwmon is using = read sensor data from a driver, and the driver being bound is stopping = the phosphor-regulators read from succeeding. >=20 > Thanks, >=20 > Shawn >=20 --Apple-Mail=_5A15258E-FB50-4A32-9F1E-280B7D0FFD0E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Shawn,

I = was mainly surprised because a conversation I had with Guenter, if I = remember correctly, suggested that /dev/i2c calls from user space work = with hwmon, because hwmon does not lock the i2c except when using = it.

So I = assumed that in this case, it was the polling of hwmon that was just = keeping it locked enough to conflict with phosphor-regulators and then = it gives up.

I = could just not use hwmon at all use phosphor-regulators for all = telemetry, but this seemed like more work.

Also, I will need to figure out how to = connect phosphor-regulators telemetry to Redfish and the WebUI. Are = there examples of how to do that?

Mike

On Feb 11, 2022, at 8:32 AM, Shawn McCarney <shawnmm@linux.ibm.com> wrote:

=20 =20
On 2/9/2022 4:30 PM, Mike Jones wrote:
=20 =20 The journal shows an I2C error: Device or resource busy.

Does hwmon lock out phosphor-regulators if it uses = the same address?

phosphor-regulators currently = communicates directly with voltage regulators using i2c-dev; it does not use device drivers.

The reason is that most regulator drivers provide either no = or very limited ability to configure regulators.  For the = systems I work on, we need to do extensive regulator configuration to fine tune things (output voltage, pgood min/max, timing, etc.)  Redundant phase fault detection is also pretty device-specific and on involves communicating with multiple devices.

I have not tested using phosphor-regulators when a = driver is bound to the regulator, but I suspect you may be right.  I = assume hwmon is using read sensor data from a driver, and the driver being bound is stopping the phosphor-regulators read from succeeding.

Thanks,

Shawn


= --Apple-Mail=_5A15258E-FB50-4A32-9F1E-280B7D0FFD0E--