Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: sean.wang@mediatek.com
Cc: nbd@nbd.name, lorenzo.bianconi@redhat.com,
	Soul.Huang@mediatek.com, YN.Chen@mediatek.com,
	robin.chiu@mediatek.com, ch.yeh@mediatek.com,
	posh.sun@mediatek.com, Eric.Liang@mediatek.com,
	Stella.Chang@mediatek.com, linux-wireless@vger.kernel.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 1/2] mt76: mt7921: add debugfs knob for performing wifi reset
Date: Thu, 15 Apr 2021 17:07:19 +0200	[thread overview]
Message-ID: <YHhWp9nwW3ggZtNC@lore-desk> (raw)
In-Reply-To: <1618498409-7155-1-git-send-email-sean.wang@mediatek.com>


[-- Attachment #1.1: Type: text/plain, Size: 1878 bytes --]

> From: Sean Wang <sean.wang@mediatek.com>
> 
> >> From: Sean Wang <sean.wang@mediatek.com>
> >>
> >> Introduce chip_reset knob in mt7921 debugfs to export a way to users
> >> able to trigger wifi reset.
> >>
> >> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> >> ---
> >>  drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c | 11 +++++++++++
> >>  1 file changed, 11 insertions(+)
> >>
> >> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
> >> b/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
> >> index 024524173115..1342a0b645e3 100644
> >> --- a/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
> >> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
> >> @@ -302,6 +302,16 @@ static int mt7921_config(void *data, u64 val)
> >>
> >>  DEFINE_DEBUGFS_ATTRIBUTE(fops_config, NULL, mt7921_config, "%lld\n");
> >>
> >> +static int mt7921_chip_reset(void *data, u64 val) {
> >> +	struct mt7921_dev *dev = data;
> >> +
> >> +	mt7921_reset(&dev->mt76);
> >> +
> >> +	return 0;
> >> +}
> >> +DEFINE_DEBUGFS_ATTRIBUTE(fops_reset, NULL, mt7921_chip_reset,
> >> +"%lld\n");
> >
> >can we use chip_config for this?
> 
> i think we can resue the the knob for chip_reset. i will do it in the next version.

ack, I agree. Please rename the chip_config in something lile reset or similar.

Thanks,
Lorenzo

> 
> >
> >Regards,
> >Lorenzo
> >
> >> +
> >>  int mt7921_init_debugfs(struct mt7921_dev *dev)  {
> >>	struct dentry *dir;
> >> @@ -322,6 +332,7 @@ int mt7921_init_debugfs(struct mt7921_dev *dev)
> >>	debugfs_create_file("idle-timeout", 0600, dir, dev,
> >>			    &fops_pm_idle_timeout);
> >>	debugfs_create_file("chip_config", 0600, dir, dev, &fops_config);
> >> +	debugfs_create_file("chip_reset", 0600, dir, dev, &fops_reset);
> >>
> >>	return 0;
> >>  }
> >> --
> >> 2.25.1
> >>
> >

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

      reply	other threads:[~2021-04-15 15:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15 13:41 [PATCH 1/2] mt76: mt7921: add debugfs knob for performing wifi reset sean.wang
2021-04-15 13:41 ` [PATCH 2/2] mt76: mt7921: abort uncompleted scan by " sean.wang
2021-04-15 13:53 ` [PATCH 1/2] mt76: mt7921: add debugfs knob for performing " Lorenzo Bianconi
2021-04-15 14:53   ` sean.wang
2021-04-15 15:07     ` Lorenzo Bianconi [this message]

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=YHhWp9nwW3ggZtNC@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=Eric.Liang@mediatek.com \
    --cc=Soul.Huang@mediatek.com \
    --cc=Stella.Chang@mediatek.com \
    --cc=YN.Chen@mediatek.com \
    --cc=ch.yeh@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=posh.sun@mediatek.com \
    --cc=robin.chiu@mediatek.com \
    --cc=sean.wang@mediatek.com \
    /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