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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 022C4C49EA5 for ; Thu, 24 Jun 2021 17:50:41 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5A185613C7 for ; Thu, 24 Jun 2021 17:50:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A185613C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4G9njW3vzwz30BG for ; Fri, 25 Jun 2021 03:50:39 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=j46HZGuN; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::d31; helo=mail-io1-xd31.google.com; envelope-from=bjwyman@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=20161025 header.b=j46HZGuN; dkim-atps=neutral Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (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 4G9nhx2L17z306r for ; Fri, 25 Jun 2021 03:50:08 +1000 (AEST) Received: by mail-io1-xd31.google.com with SMTP id g22so9367542iom.1 for ; Thu, 24 Jun 2021 10:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=vIvp5jhVhiKjRxYQVD8HMzblb2G6Xvdh3OJm349TqgA=; b=j46HZGuN/FqzntP8mZvKF0GY5DZ3gIQnpzvYTqgr1inXZfYJLep7ARhWZlKzOZBYhW pI5xAkl5xZUVTiqdp8ZAIRcgp1XM5XCFTX8DasXBTQ84zXPkJsTvMPjZpGCrrHoJlm+3 afZRom5OYj8p+397vqE1OOSxKfmTxpe5YqEm+1zBAI3R4yRd6iOBa9KER/1VAhj0OkhE R8AbcAtqyTEIqS9EGF6r5DbidarB9Z5+UlNsnrR2JKUvo5dG1en0kxRleFVyod1H09rv 7PJybufYnNCHHTVx/ABhf0gxwnFo4MqxGsSyNZyCrYXoPs9C0WHYTxAe5/kvkQVQFCHi 8RNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=vIvp5jhVhiKjRxYQVD8HMzblb2G6Xvdh3OJm349TqgA=; b=oq3bgpMPdgIiomQgu+pZC60NFPwtTdU2XfomzrSIByEb/na8T9WvBkz4KVEAmL/dlC KJ5BlRPTBXE3sCpK/B+o5XE9K4N6PZPqglvRSIpxi20XL8P1Dow/QR96DrivvzJp8x/v s7EOn9PTYN9Cfc8tTGlSR58kBUTBCcYOr96kjfKrglw/nHs/h+mhR7XkRQLdnffbkhB7 PTE1WmmRhPluwmcFsU2LsK9IWyNmeD9XcORamdAl8WLnnd1DweGJaeGAuwb/VCsbFxBt /UXL1kHXUhZMTkwdm8ISaqNBYYKXN9e6nN9KBX1IlStkXSspFsqbmhNTw1ceyYJ5eehz oJrQ== X-Gm-Message-State: AOAM5309/0NVZaIy5LEfjkrz1M4Yn/ao7bou0sXE9YwXfmO5rP6nVEx5 VimP5aqd/tSecSwvLJ4HMoU= X-Google-Smtp-Source: ABdhPJzxJOvLEOeOXhMMFGKgfn67K4BcoKpalQNuJDzd6w9s7ZfA/hnd+xT5riN4NwgnO6Z1CEM7Zg== X-Received: by 2002:a6b:3b16:: with SMTP id i22mr5079292ioa.36.1624557003783; Thu, 24 Jun 2021 10:50:03 -0700 (PDT) Received: from [192.168.4.31] (199-48-94-117.rochmnaa.metronetinc.net. [199.48.94.117]) by smtp.gmail.com with ESMTPSA id n17sm2246861ilt.16.2021.06.24.10.50.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Jun 2021 10:50:03 -0700 (PDT) Subject: Re: [Phosphor-power] psu-ng: Add method to get PSU conf from D-Bus. To: Chanh Nguyen OS , "openbmc@lists.ozlabs.org" References: From: Brandon Wyman Message-ID: <7a434ef2-c15d-be17-e443-2eedf5fc3ed4@gmail.com> Date: Thu, 24 Jun 2021 12:50:02 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------D39B40108939505B6677D16F" Content-Language: en-US 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: "spinler@us.ibm.com" , Thang Nguyen , "shawnmm@us.ibm.com" , Phong Vo Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" This is a multi-part message in MIME format. --------------D39B40108939505B6677D16F Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit On 2021-06-23 04:11, Chanh Nguyen OS wrote: > Hi B. J. Wyman, > > I'm using the psu-ng to monitor the PSU. I used the > */pmbus/*(https://github.com/openbmc/linux/blob/dev-5.10/Documentation/hwmon/pmbus.rst > ) > driver to support hardware monitoring for the PSU, don't use the > */ibm-cffps/*driver > (https://github.com/openbmc/linux/blob/dev-5.10/Documentation/hwmon/ibm-cffps.rst > ) > > I don't clear why we fix to use the *IBMCFFPSInterface > (https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-power/+/38138/10/phosphor-power-supply/psu_manager.cpp#16 > )* ? Yeah, that was sort of a short-sighted updated. That probably should have been something configurable: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-power/+/43018/8/phosphor-power-supply/power_supply.cpp#30 That is used to get the power supply information off of D-Bus, hopefully populated by the entity-manager service. https://github.com/openbmc/entity-manager/blob/master/schemas/IBM.json https://github.com/openbmc/entity-manager/blob/master/configurations/Nisqually.json This should *NOT* be IBM specific, but I had some kind of blinders on when I wrote this. > > Thanks, > Chanh Nguyen > --------------D39B40108939505B6677D16F Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit


On 2021-06-23 04:11, Chanh Nguyen OS wrote:
Hi B. J. Wyman,

I'm using the psu-ng to monitor the PSU. I used the pmbus (https://github.com/openbmc/linux/blob/dev-5.10/Documentation/hwmon/pmbus.rst) driver to support hardware monitoring for the PSU, don't use the ibm-cffps driver (https://github.com/openbmc/linux/blob/dev-5.10/Documentation/hwmon/ibm-cffps.rst)

Yeah, that was sort of a short-sighted updated. That probably should have been something configurable:

https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-power/+/43018/8/phosphor-power-supply/power_supply.cpp#30


That is used to get the power supply information off of D-Bus, hopefully populated by the entity-manager service.

https://github.com/openbmc/entity-manager/blob/master/schemas/IBM.json

https://github.com/openbmc/entity-manager/blob/master/configurations/Nisqually.json


This should *NOT* be IBM specific, but I had some kind of blinders on when I wrote this.


Thanks,
Chanh Nguyen

--------------D39B40108939505B6677D16F--