From: Nguyen, Anthony L <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH intel-next] ice: add TTY for GNSS module for E810T device
Date: Wed, 8 Dec 2021 17:43:47 +0000 [thread overview]
Message-ID: <f68d7a724f366deb5fbb7a1160561c71eb158392.camel@intel.com> (raw)
In-Reply-To: <20211208154333.179459-1-karol.kolacinski@intel.com>
On Wed, 2021-12-08 at 16:43 +0100, Karol Kolacinski wrote:
> Add a new ice_gnss.c file for holding the basic GNSS module
> functions.
> If the device supports GNSS module, call the new ice_gnss_init and
> ice_gnss_release functions where appropriate.
>
> Implement basic functionality for reading the data from GNSS module
> using TTY device.
>
> Add I2C read AQ command. It is now required for controlling the
> external
> physical connectors via external I2C port expander on E810-T
> adapters.
>
> Future changes will introduce write functionality.
>
> Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
> Signed-off-by: Sudhansu Sekhar Mishra <sudhansu.mishra@intel.com>
> ---
Please add/increment the version with change log.
<snip>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c
> b/drivers/net/ethernet/intel/ice/ice_main.c
> index e8b5bb815dcf..84a47f2576c3 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -570,6 +570,12 @@ ice_prepare_for_reset(struct ice_pf *pf, enum
> ice_reset_req reset_type)
> ????????if (test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags))
> ????????????????ice_ptp_release(pf);
> ?
> +???????if (ice_is_feature_supported(pf, ICE_F_GNSS))
> +???????????????ice_gnss_exit(pf);
> +
> +???????if (ice_is_feature_supported(pf, ICE_F_GNSS))
> +???????????????ice_gnss_exit(pf);
> +
An extra by mistake?
> ????????if (hw->port_info)
> ????????????????ice_sched_clear_port(hw->port_info);
>
?
> @@ -6724,6 +6735,12 @@ static void ice_rebuild(struct ice_pf *pf,
> enum ice_reset_req reset_type)
> ????????if (test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags))
> ????????????????ice_ptp_init(pf);
> ?
> +???????if (ice_is_feature_supported(pf, ICE_F_GNSS))
> +???????????????ice_gnss_init(pf);
> +
> +???????if (ice_is_feature_supported(pf, ICE_F_GNSS))
> +???????????????ice_gnss_init(pf);
> +
An extra by mistake?
> ????????/* rebuild PF VSI */
> ????????err = ice_vsi_rebuild_by_type(pf, ICE_VSI_PF);
> ????????if (err) {
> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
> b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
> index ec8450f034e6..463044ae5fcc 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
> @@ -3250,6 +3250,39 @@ int ice_write_sma_ctrl_e810t(struct ice_hw
> *hw, u8 data)
> ????????return status;
> ?}
> ?
> +/**
> + * ice_read_pca9575_reg_e810t
> + * @hw: pointer to the hw struct
> + * @offset: GPIO controller register offset
> + * @data: pointer to data to be read from the GPIO controller
> + *
> + * Read the register from the GPIO controller
> + */
> +int ice_read_pca9575_reg_e810t(struct ice_hw *hw, u8 offset, u8
> *data)
> +{
> +???????struct ice_aqc_link_topo_addr link_topo;
> +???????__le16 addr;
> +???????u16 handle;
> +???????int err;
> +
> +???????memset(&link_topo, 0, sizeof(link_topo));
> +
> +???????err = ice_get_pca9575_handle(hw, &handle);
> +???????if (err)
> +???????????????return err;
> +
> +???????link_topo.handle = cpu_to_le16(handle);
> +???????link_topo.topo_params.node_type_ctx =
> +???????????????(ICE_AQC_LINK_TOPO_NODE_CTX_PROVIDED <<
> +??????????????? ICE_AQC_LINK_TOPO_NODE_CTX_S);
> +
> +???????addr = cpu_to_le16((u16)offset);
> +
> +???????err = ice_aq_read_i2c(hw, link_topo, 0, addr, 1, data, NULL);
> +
> +???????return err;
This can be 'return ice_aq_read_i2c(hw, link_topo, 0, addr, 1, data,
NULL);'
next prev parent reply other threads:[~2021-12-08 17:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 15:43 [Intel-wired-lan] [PATCH intel-next] ice: add TTY for GNSS module for E810T device Karol Kolacinski
2021-12-08 17:43 ` Nguyen, Anthony L [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-11-18 15:31 Karol Kolacinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f68d7a724f366deb5fbb7a1160561c71eb158392.camel@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox