B.G 17.04
यजन्ते सात्त्विका देवान् यक्षरक्षांसि राजसाः। भूतान् प्रेतगणांश्चान्ये यजन्ते तामसा जनाः ॥४॥
yajante sāttvikā devān yakṣarakṣāṃsi rājasāḥ। bhūtān pretagaṇāṃścānye yajante tāmasā janāḥ ॥4॥
[यजन्ते (yajante) - worship; सात्त्विकाः (sāttvikāḥ) - those in the mode of goodness; देवान् (devān) - gods; यक्षरक्षांसि (yakṣarakṣāṃsi) - yakṣas and rākṣasas; राजसाः (rājasāḥ) - those in the mode of passion; भूतान् (bhūtān) - ghosts; प्रेतगणान् (pretagaṇān) - spirits; च (ca) - and; अन्ये (anye) - others; यजन्ते (yajante) - worship; तामसाः (tāmasāḥ) - those in the mode of ignorance; जनाः (janāḥ) - people;]
People in the mode of goodness worship gods, those in the mode of passion worship yakṣas and rākṣasas, and those in the mode of ignorance worship ghosts and spirits.
Gīta Bhāshya 17.04
Faith is classified based on nature of worship.
कः सात्त्विकश्रद्धः इत्यादि विभज्याह - यजन्त इत्यादिना ॥४॥
kaḥ sāttvikaśraddhaḥ ityādi vibhajyāha - yajanta ityādinā ॥4॥
[कः (kaḥ) - who; सात्त्विक (sāttvika) - pure; श्रद्धः (śraddhaḥ) - faith; इत्यादि (ityādi) - etc.; विभज्य (vibhajya) - dividing; आह (āha) - said; यजन्त (yajanta) - worship; इत्यादिना (ityādinā) - etc.;]
Who is of pure faith, etc., is explained by classifying the worship, among other things.