God indeed gives us our faith. He also created us with free will or volition, so that when we quench the Spirit, he no longer is free to continue our sanctification and further our faith or doctrine or thinking within our spirit until we return to Him by turning away from disobedience and returning to Him and confessing our sin to Him for His grace to forgive us and work again upon our soul, and our spirit.
"For those whom the Lord loves He disciplines, and He scourges every son whom He receives. It is for discipline that you endure; God deals with you as with sons; for what son is there whom his father does not discipline?" (Heb 12:6-7)
God gives us our faith according to His measure. If He has received us He will sanctify us through His discipline.